pub struct Host { /* private fields */ }
Implementations§
Source§impl Host
impl Host
pub fn new(context: Context, registry: RegistryHandle) -> Self
pub fn fork(&self) -> Self
pub fn push_global(self) -> Result<HostId, Self>
pub fn pop_global() -> Option<Self>
pub fn remove_global(id: HostId) -> Option<Self>
pub fn with_global<T>(f: impl FnOnce(&mut Self) -> T) -> Option<T>
pub fn context(&mut self) -> &mut Context
pub fn registry(&self) -> &Registry
pub fn context_and_registry(&mut self) -> (&mut Context, &Registry)
pub fn find_function( &self, name: &str, module_name: &str, type_name: Option<&str>, ) -> Option<FunctionHandle>
pub fn call_function<O: DataStackPack, I: DataStackPack>( &mut self, name: &str, module_name: &str, type_name: Option<&str>, ) -> Option<HostFunctionCall<'_, I, O>>
Auto Trait Implementations§
impl Freeze for Host
impl !RefUnwindSafe for Host
impl Send for Host
impl Sync for Host
impl Unpin for Host
impl !UnwindSafe for Host
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