referrerpolicy=no-referrer-when-downgrade

Derive Macro frame_support::CloneNoBound

source ·
#[derive(CloneNoBound)]
Expand description

Derive Clone but do not bound any generic.

This is useful for type generic over runtime:

trait Config {
		type C: Clone;
}

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

Derive Clone but do not bound any generic.

Docs at frame_support::CloneNoBound.