[][src]Trait syn_ext::ext::MetaIteratorExt

pub trait MetaIteratorExt<'a, M> where
    M: 'a + Borrow<Meta>, 
{ fn to_multi_map<K, KF>(
        self,
        path_to_key: KF
    ) -> Result<Map<K, Vec<(usize, M)>>>
    where
        K: Hash + Eq,
        KF: Fn(&Path) -> Result<Option<K>>
;
fn to_unique_map<K, KF>(self, path_to_key: KF) -> Result<Map<K, (usize, M)>>
    where
        K: Hash + Eq,
        KF: Fn(&Path) -> Result<Option<K>>
; }

Constructs and returns map from syn::Meta iterator

Required methods

fn to_multi_map<K, KF>(self, path_to_key: KF) -> Result<Map<K, Vec<(usize, M)>>> where
    K: Hash + Eq,
    KF: Fn(&Path) -> Result<Option<K>>, 

Constructs and returns a multi-value map from syn::Meta iterator

fn to_unique_map<K, KF>(self, path_to_key: KF) -> Result<Map<K, (usize, M)>> where
    K: Hash + Eq,
    KF: Fn(&Path) -> Result<Option<K>>, 

Constructs and returns a unique-value map from syn::Meta iterator. Err if duplicates.

Loading content...

Implementors

impl<'a, I, M> MetaIteratorExt<'a, M> for I where
    M: 'a + Borrow<Meta>,
    I: Iterator<Item = (usize, M)>, 
[src]

Loading content...