pub struct ThreadLocalCtxt { /* private fields */ }Expand description
A Ctxt that stores ambient state in thread local storage.
Frames fully encapsulate all properties that were active when they were created so can be sent across threads to move that state with them.
Implementations§
Source§impl ThreadLocalCtxt
impl ThreadLocalCtxt
Create a new thread local store sharing the same storage as any other ThreadLocalCtxt::shared.
Trait Implementations§
Source§impl Clone for ThreadLocalCtxt
impl Clone for ThreadLocalCtxt
Source§fn clone(&self) -> ThreadLocalCtxt
fn clone(&self) -> ThreadLocalCtxt
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Ctxt for ThreadLocalCtxt
impl Ctxt for ThreadLocalCtxt
Source§type Current = ThreadLocalCtxtFrame
type Current = ThreadLocalCtxtFrame
The type of
Props used in Ctxt::with_current.Source§type Frame = ThreadLocalCtxtFrame
type Frame = ThreadLocalCtxtFrame
The type of frame returned by
Ctxt::open_root and Ctxt::open_push.Source§fn with_current<R, F: FnOnce(&Self::Current) -> R>(&self, with: F) -> R
fn with_current<R, F: FnOnce(&Self::Current) -> R>(&self, with: F) -> R
Access the current context. Read more
Source§fn open_root<P: Props>(&self, props: P) -> Self::Frame
fn open_root<P: Props>(&self, props: P) -> Self::Frame
Create a frame that will set the context to just the properties in
P. Read moreSource§impl Debug for ThreadLocalCtxt
impl Debug for ThreadLocalCtxt
Source§impl Default for ThreadLocalCtxt
impl Default for ThreadLocalCtxt
impl Copy for ThreadLocalCtxt
impl InternalCtxt for ThreadLocalCtxt
Auto Trait Implementations§
impl Freeze for ThreadLocalCtxt
impl RefUnwindSafe for ThreadLocalCtxt
impl Send for ThreadLocalCtxt
impl Sync for ThreadLocalCtxt
impl Unpin for ThreadLocalCtxt
impl UnwindSafe for ThreadLocalCtxt
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