fn make_metadata(
        dict: &BTreeSet<Identifier>,
        #[cfg(not(feature = "no_module"))] namespace: Identifier,
        func: &ScriptFnDef,
    ) -> Map {
        const DICT: &str = "key exists";

        let mut map = Map::new();

        #[cfg(not(feature = "no_module"))]
        if !namespace.is_empty() {
            map.insert(dict.get("namespace").expect(DICT).clone(), namespace.into());
        }
        map.insert(
            dict.get("name").expect(DICT).clone(),
            func.name.clone().into(),
        );
        map.insert(
            dict.get("access").expect(DICT).clone(),
            match func.access {
                FnAccess::Public => dict.get("public").expect(DICT).clone(),
                FnAccess::Private => dict.get("private").expect(DICT).clone(),
            }
            .into(),
        );
        map.insert(
            dict.get("is_anonymous").expect(DICT).clone(),
            func.name.starts_with(crate::engine::FN_ANONYMOUS).into(),
        );
        map.insert(
            dict.get("params").expect(DICT).clone(),
            func.params
                .iter()
                .cloned()
                .map(Into::into)
                .collect::<Array>()
                .into(),
        );

        map
    }
// Create a metadata record for a function.
Create a metadata record for a function.
Create a metadata record for a function .
fn make_metadata(
        dict: &BTreeSet<Identifier>,
        #[cfg(not(feature = "no_module"))] namespace: Identifier,
        func: &ScriptFnDef,
    ) -> Map {
        const DICT: &str = "key exists";
        let mut map = Map::new();
        #[cfg(not(feature = "no_module"))]
        if !namespace.is_empty() {
            map.insert(dict.get("namespace").expect(DICT).clone(), namespace.into());
        }
        map.insert(
            dict.get("name").expect(DICT).clone(),
            func.name.clone().into(),
        );
        map.insert(
            dict.get("access").expect(DICT).clone(),
            match func.access {
                FnAccess::Public => dict.get("public").expect(DICT).clone(),
                FnAccess::Private => dict.get("private").expect(DICT).clone(),
            }
            .into(),
        );
        map.insert(
            dict.get("is_anonymous").expect(DICT).clone(),
            func.name.starts_with(crate::engine::FN_ANONYMOUS).into(),
        );
        map.insert(
            dict.get("params").expect(DICT).clone(),
            func.params
                .iter()
                .cloned()
                .map(Into::into)
                .collect::<Array>()
                .into(),
        );
        map
    }
fn make_metadata ( dict : & BTreeSet < Identifier > , # [ cfg ( not ( feature " " ) ) ] namespace : Identifier , func : & ScriptFnDef , ) -> Map { const DICT : & str = " " ; let mut map = Map :: new ( ) ; # [ cfg ( not ( feature " " ) ) ] if ! namespace . is_empty ( ) { map . insert ( dict . get ( " " ) . expect ( DICT ) . clone ( ) , namespace . into ( ) ) ; } map . insert ( dict . get ( " " ) . expect ( DICT ) . clone ( ) , func . name . clone ( ) . into ( ) , ) ; map . insert ( dict . get ( " " ) . expect ( DICT ) . clone ( ) , match func . access { FnAccess :: Public => dict . get ( " " ) . expect ( DICT ) . clone ( ) , FnAccess :: Private => dict . get ( " " ) . expect ( DICT ) . clone ( ) , } . into ( ) , ) ; map . insert ( dict . get ( " " ) . expect ( DICT ) . clone ( ) , func . name . starts_with ( crate :: engine :: FN_ANONYMOUS ) . into ( ) , ) ; map . insert ( dict . get ( " " ) . expect ( DICT ) . clone ( ) , func . params . iter ( ) . cloned ( ) . map ( Into :: into ) . collect :: < Array > ( ) . into ( ) , ) ; map }
Create a metadata record for a function.
Create a metadata record for a function .
dict
&BTreeSet<Identifier>
namespace
Identifier
func
&ScriptFnDef