Macro define_adapter
Source macro_rules! define_adapter {
($vis:vis $name:ident $(<$($tyvar:ident $(: $bound:path)?),*>)? => $node:ident $(<$($node_tyvar:ident),*>)? :: $link:ident) => { ... };
}
Expand description
Defines an adapter type and implements Adapter for it.
§Usage
define_adapter! accepts a syntax like the following (where type arguments
are optional):
use list::{Link, define_adapter};
struct Node<T: Copy> {
data: T,
link: Link,
}
define_adapter!(pub Adapter<T: Copy> => Node<T>::link);