[][src]Macro etc::parameter_types

macro_rules! parameter_types {
    (
		$( #[ $attr:meta ] )*
		$vis:vis const $name:ident: $type:ty = $value:expr;
		$( $rest:tt )*
	) => { ... };
    () => { ... };
    (IMPL $name:ident , $type:ty , $value:expr) => { ... };
}

Macro for easily creating a new implementation of the Get trait. Use similarly to how you would declare a const:

parameter_types! {
  pub const Argument: u64 = 42;
}
trait Config {
  type Parameter: Get<u64>;
}
struct Runtime;
impl Config for Runtime {
  type Parameter = Argument;
}