macro_rules! decl_extension {
    (
		$( #[ $attr:meta ] )*
		$vis:vis struct $ext_name:ident ($inner:ty);
	) => { ... };
    (
		$( #[ $attr:meta ] )*
		$vis:vis struct $ext_name:ident;
	) => { ... };
}
Expand description

Macro for declaring an extension that usable with Extensions.

The extension will be an unit wrapper struct that implements Extension, Deref and DerefMut. The wrapped type is given by the user.

Example

decl_extension! {
    /// Some test extension
    struct TestExt(String);
}