Skip to main content

type_path

Macro type_path 

Source
macro_rules! type_path {
    (:: $($body:tt)*) => { ... };
    ($segment:ident $($body:tt)*) => { ... };
    (< $($ty_segment:ident)::* > :: $($body:tt)*) => { ... };
    (< :: $($ty_segment:ident)::* > :: $($body:tt)*) => { ... };
    (< $($ty_segment:ident)::* as $($as_segment:ident)::* > :: $($body:tt)*) => { ... };
    (< :: $($ty_segment:ident)::* as $($as_segment:ident)::* > :: $($body:tt)*) => { ... };
    (< $($ty_segment:ident)::* as :: $($as_segment:ident)::* > :: $($body:tt)*) => { ... };
    (< :: $($ty_segment:ident)::* as :: $($as_segment:ident)::* > :: $($body:tt)*) => { ... };
}
Expand description

This macro takes type paths of the form my_crate::my_mod::FooBar and <my_crate::my_mod::FooBar as my_crate::my_mod::MyTrait>::MyType and turns them into a syn::TypePath.