#[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>(self, value: T) -> EngineContext
pub fn with<T>(self, value: T) -> EngineContext
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§fn clone(&self) -> EngineContext
fn clone(&self) -> EngineContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EngineContext
impl Debug for EngineContext
Source§impl Default for EngineContext
impl Default for EngineContext
Source§fn default() -> EngineContext
fn default() -> EngineContext
Returns the “default value” for a type. Read more
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