pub fn new_toplevel<S: AsRef<str>>(name: S) -> ContextHandle {
        let magic_id = rand::random();

        let mut globals = NameSpace::default();
        let name_id = globals.share_name(name);

        let ctx = Self {
            magic_id,
            name_id,
            globals,
            dots: Default::default(),
            atoms: Default::default(),
            content: Default::default(),
            capacities: Default::default(),
            core_weights: Default::default(),
            wedge_weights: Default::default(),
            solver_props: Default::default(),
            runner_props: Default::default(),
            vis_props: Default::default(),
        };

        Arc::new(Mutex::new(ctx))
    }
/// Creates a new toplevel `Context` instance and returns the
/// corresponding [`ContextHandle`].
///
/// Calling this method is the only public way of creating
/// toplevel `Context` instances.
Creates a new toplevel `Context` instance and returns the
corresponding [`ContextHandle`].

Calling this method is the only public way of creating
toplevel `Context` instances.
Creates a new toplevel ` Context ` instance and returns the corresponding [ ` ContextHandle ` ] . Calling this method is the only public way of creating toplevel ` Context ` instances .
pub fn new_toplevel<S: AsRef<str>>(name: S) -> ContextHandle {
        let magic_id = rand::random();
        let mut globals = NameSpace::default();
        let name_id = globals.share_name(name);
        let ctx = Self {
            magic_id,
            name_id,
            globals,
            dots: Default::default(),
            atoms: Default::default(),
            content: Default::default(),
            capacities: Default::default(),
            core_weights: Default::default(),
            wedge_weights: Default::default(),
            solver_props: Default::default(),
            runner_props: Default::default(),
            vis_props: Default::default(),
        };
        Arc::new(Mutex::new(ctx))
    }
pub fn new_toplevel < S : AsRef < str > > ( name : S ) -> ContextHandle { let magic_id = rand :: random ( ) ; let mut globals = NameSpace :: default ( ) ; let name_id = globals . share_name ( name ) ; let ctx = Self { magic_id , name_id , globals , dots : Default :: default ( ) , atoms : Default :: default ( ) , content : Default :: default ( ) , capacities : Default :: default ( ) , core_weights : Default :: default ( ) , wedge_weights : Default :: default ( ) , solver_props : Default :: default ( ) , runner_props : Default :: default ( ) , vis_props : Default :: default ( ) , } ; Arc :: new ( Mutex :: new ( ctx ) ) }
Creates a new toplevel `Context` instance and returns the
corresponding [`ContextHandle`].
Creates a new toplevel ` Context ` instance and returns the corresponding [ ` ContextHandle ` ] .
name
S
name
S