Derive Macro frame_support::pallet_prelude::PartialEqNoBound

source ยท
#[derive(PartialEqNoBound)]
Expand description

Derive PartialEq but do not bound any generic.

This is useful for type generic over runtime:

trait Config {
		type C: PartialEq;
}

// Foo implements [`PartialEq`] because `C` bounds [`PartialEq`].
// Otherwise compilation will fail with an output telling `c` doesn't implement [`PartialEq`].
#[derive(PartialEqNoBound)]
struct Foo<T: Config> {
		c: T::C,
}

Derive PartialEq but do not bound any generic.

Docs at frame_support::PartialEqNoBound.