Macro query_interface::interfaces
[−]
[src]
macro_rules! interfaces { (@unbracket $(($($v:tt)*))*) => { ... }; (@inner $imp:tt $cond:tt $name:ty: $($iface:ty),+ {}) => { ... }; (@imp ($($result:tt)*) $name:ty: $($iface:ty),+ $(where $($cond:tt)*)*) => { ... }; (@parse < $($rest:tt)*) => { ... }; (@parse $($rest:tt)*) => { ... }; (@parseArg ($($result:tt)*) $name:ident , $($rest:tt)*) => { ... }; (@parseArg ($($result:tt)*) $name:ident : $($rest:tt)*) => { ... }; (@parseArg ($($result:tt)*) $name:ident > $($rest:tt)*) => { ... }; (@parseBound ($($result:tt)*) $bound:tt + $($rest:tt)*) => { ... }; (@parseBound ($($result:tt)*) $bound:tt , $($rest:tt)*) => { ... }; (@parseBound ($($result:tt)*) $bound:tt > $($rest:tt)*) => { ... }; (< $($rest:tt)*) => { ... }; ($x:ty: $($rest:tt)*) => { ... }; (@expand2 ($name:ty) ($($rest:tt)*)) => { ... }; (@expand {$($name:ty),*} $rest:tt) => { ... }; ({$($name:ty),*} $($rest:tt)*) => { ... }; }
Allow a set of traits to be dynamically queried from a type when it is
stored as an Object
trait object.
Example use:
#[derive(Clone)] struct Foo; interfaces!(Foo: ObjectClone);