pub struct Context<'gc> { /* private fields */ }Implementations§
Source§impl<'gc> Context<'gc>
impl<'gc> Context<'gc>
pub fn globals(self) -> Table<'gc>
pub fn registry(self) -> Registry<'gc>
pub fn interned_strings(self) -> InternedStringSet<'gc>
pub fn finalizers(self) -> Finalizers<'gc>
Sourcepub fn set_global<K: IntoValue<'gc>, V: IntoValue<'gc>>(
self,
key: K,
value: V,
) -> Result<Value<'gc>, InvalidTableKey>
pub fn set_global<K: IntoValue<'gc>, V: IntoValue<'gc>>( self, key: K, value: V, ) -> Result<Value<'gc>, InvalidTableKey>
Calls ctx.globals().set(ctx, key, value).
Sourcepub fn get_global<K: IntoValue<'gc>>(self, key: K) -> Value<'gc>
pub fn get_global<K: IntoValue<'gc>>(self, key: K) -> Value<'gc>
Calls ctx.globals().get(ctx, key).
Sourcepub fn intern_static(self, s: &'static [u8]) -> String<'gc>
pub fn intern_static(self, s: &'static [u8]) -> String<'gc>
Calls ctx.interned_strings().intern_static(&ctx, s).
Trait Implementations§
impl<'gc> Copy for Context<'gc>
Auto Trait Implementations§
impl<'gc> Freeze for Context<'gc>
impl<'gc> !RefUnwindSafe for Context<'gc>
impl<'gc> !Send for Context<'gc>
impl<'gc> !Sync for Context<'gc>
impl<'gc> Unpin for Context<'gc>
impl<'gc> !UnwindSafe for Context<'gc>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more