#[non_exhaustive]pub struct EngineContext { /* private fields */ }Expand description
Typed values a host gives one engine (EngineConfig::context), at most
one per type, which its Rust code reads with engine_context.
Implementations§
Source§impl EngineContext
impl EngineContext
Sourcepub fn with<T: Send + Sync + 'static>(self, value: T) -> Self
pub fn with<T: Send + Sync + 'static>(self, value: T) -> Self
This context with value as its T, replacing one it had.
Sourcepub fn enter(&self) -> EngineContextGuard
pub fn enter(&self) -> EngineContextGuard
Makes it the current thread’s until the guard drops: what
engine_context reads there (the engine does this on its thread).
Trait Implementations§
Source§impl Clone for EngineContext
impl Clone for EngineContext
Source§impl Debug for EngineContext
impl Debug for EngineContext
Auto Trait Implementations§
impl !RefUnwindSafe for EngineContext
impl !UnwindSafe for EngineContext
impl Forget for EngineContext
impl Freeze for EngineContext
impl Move for EngineContext
impl Send for EngineContext
impl Sync for EngineContext
impl Unpin for EngineContext
impl UnsafeUnpin for EngineContext
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