Struct gluon_vm::vm::GlobalVmState
source · pub struct GlobalVmState {
pub gc: Mutex<Gc>,
pub generation_0_threads: RwLock<Vec<GcPtr<Thread>>>,
/* private fields */
}
Fields
gc: Mutex<Gc>
generation_0_threads: RwLock<Vec<GcPtr<Thread>>>
Implementations
sourceimpl GlobalVmState
impl GlobalVmState
pub fn new() -> Self
pub fn type_cache(&self) -> &TypeCache<Symbol, ArcType>
pub fn new_global_thunk(&self, f: CompiledModule) -> Result<GcPtr<ClosureData>>
pub fn get_type<T: ?Sized + Any>(&self) -> Option<ArcType>
sourcepub fn global_exists(&self, name: &str) -> bool
pub fn global_exists(&self, name: &str) -> bool
Checks if a global exists called name
pub fn get_generic(&self, name: &str) -> ArcType
sourcepub fn register_type<T: ?Sized + Any>(
&self,
name: &str,
args: &[&str]
) -> Result<ArcType>
pub fn register_type<T: ?Sized + Any>(
&self,
name: &str,
args: &[&str]
) -> Result<ArcType>
Registers a new type called name
pub fn register_type_as(
&self,
name: Symbol,
alias: Alias<Symbol, ArcType>,
id: TypeId
) -> Result<ArcType>
pub fn get_macros(&self) -> &MacroEnv
pub fn intern(&self, s: &str) -> Result<InternedStr>
sourcepub fn get_env<'b>(&'b self) -> RwLockReadGuard<'b, VmEnv>
pub fn get_env<'b>(&'b self) -> RwLockReadGuard<'b, VmEnv>
Returns a borrowed structure which implements CompilerEnv
pub fn get_debug_level(&self) -> DebugLevel
pub fn set_debug_level(&self, debug_level: DebugLevel)
Trait Implementations
sourceimpl Traverseable for GlobalVmState
impl Traverseable for GlobalVmState
Auto Trait Implementations
impl RefUnwindSafe for GlobalVmState
impl Send for GlobalVmState
impl Sync for GlobalVmState
impl Unpin for GlobalVmState
impl UnwindSafe for GlobalVmState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more