intrusive_collections::intrusive_adaptor!
[−]
[src]
macro_rules! intrusive_adaptor { ($name:ident = $container:path { $field:ident: $link:ty }) => { ... }; (pub $name:ident = $container:path { $field:ident: $link:ty }) => { ... }; (_impl $name:ident = $container:path { $field:ident: $link:ty }) => { ... }; ($name:ident = $container:path { $field:ident: $link:ty, }) => { ... }; (pub $name:ident = $container:path { $field:ident: $link:ty, }) => { ... }; }
Macro to generate an empty type implementing the Adaptor trait for the given container object and field.
Examples
#[macro_use] extern crate intrusive_collections; use intrusive_collections::{LinkedListLink, RBTreeLink}; pub struct Test { link: LinkedListLink, link2: RBTreeLink, } intrusive_adaptor!(MyAdaptor = Test { link: LinkedListLink }); intrusive_adaptor!(pub MyAdaptor2 = Test { link2: RBTreeLink });