Derive Macro frame_support::PartialOrdNoBound

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

Derive PartialOrd but do not bound any generic.

This is useful for type generic over runtime:

trait Config {
		type C: PartialOrd;
}

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

Derive PartialOrd but do not bound any generic. Docs are at frame_support::PartialOrdNoBound.