pub struct ContextWrapper(/* private fields */);Expand description
Provides a wrapper for Context objects which permits the management of
sequential, non-overlapping contexts.
Implementations§
Source§impl ContextWrapper
impl ContextWrapper
Sourcepub fn replace(&mut self) -> Context
pub fn replace(&mut self) -> Context
Cancels the last context, creating a new global context in its place (which is returned).
Sourcepub fn replace_ext(&mut self, ctx: impl ParentContext) -> Context
pub fn replace_ext(&mut self, ctx: impl ParentContext) -> Context
Cancels the last context, creating a new context as a child of the given context in its place.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContextWrapper
impl !RefUnwindSafe for ContextWrapper
impl Send for ContextWrapper
impl Sync for ContextWrapper
impl Unpin for ContextWrapper
impl !UnwindSafe for ContextWrapper
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