pub fn each_lang_item<F>(cdata: Cmd, mut f: F) -> bool where
    F: FnMut(ast::NodeId, usize) -> bool,
{
    let root = rbml::Doc::new(cdata.data());
    let lang_items = reader::get_doc(root, tag_lang_items);
    reader::tagged_docs(lang_items, tag_lang_items_item).all(|item_doc| {
        let id_doc = reader::get_doc(item_doc, tag_lang_items_item_id);
        let id = reader::doc_as_u32(id_doc) as usize;
        let node_id_doc = reader::get_doc(item_doc,
                                          tag_lang_items_item_node_id);
        let node_id = reader::doc_as_u32(node_id_doc) as ast::NodeId;

        f(node_id, id)
    })
}
/// Iterates over the language items in the given crate.
Iterates over the language items in the given crate.
Iterates over the language items in the given crate .
pub fn each_lang_item<F>(cdata: Cmd, mut f: F) -> bool where
    F: FnMut(ast::NodeId, usize) -> bool,
{
    let root = rbml::Doc::new(cdata.data());
    let lang_items = reader::get_doc(root, tag_lang_items);
    reader::tagged_docs(lang_items, tag_lang_items_item).all(|item_doc| {
        let id_doc = reader::get_doc(item_doc, tag_lang_items_item_id);
        let id = reader::doc_as_u32(id_doc) as usize;
        let node_id_doc = reader::get_doc(item_doc,
                                          tag_lang_items_item_node_id);
        let node_id = reader::doc_as_u32(node_id_doc) as ast::NodeId;
        f(node_id, id)
    })
}
pub fn each_lang_item < F > ( cdata : Cmd , mut f : F ) -> bool where F : FnMut ( ast :: NodeId , usize ) -> bool , { let root = rbml :: Doc :: new ( cdata . data ( ) ) ; let lang_items = reader :: get_doc ( root , tag_lang_items ) ; reader :: tagged_docs ( lang_items , tag_lang_items_item ) . all ( | item_doc | { let id_doc = reader :: get_doc ( item_doc , tag_lang_items_item_id ) ; let id = reader :: doc_as_u32 ( id_doc ) as usize ; let node_id_doc = reader :: get_doc ( item_doc , tag_lang_items_item_node_id ) ; let node_id = reader :: doc_as_u32 ( node_id_doc ) as ast :: NodeId ; f ( node_id , id ) } ) }
Iterates over the language items in the given crate.
Iterates over the language items in the given crate .
cdata
Cmd
f
F
cdata
Cmd
f
F