pub struct SerdeContext;Expand description
Used to make some limited Loader interactions available to serde Serialize/Deserialize
implementations by using thread-local storage. Required to support Serialize/Deserialize of Handle.
Implementations§
Source§impl SerdeContext
impl SerdeContext
pub fn with_active<R>( f: impl FnOnce(&dyn LoaderInfoProvider, &Sender<RefOp>) -> R, ) -> R
pub fn with<T, F>(
loader: &dyn LoaderInfoProvider,
sender: Sender<RefOp>,
f: F,
) -> Twhere
F: FnOnce() -> T,
Auto Trait Implementations§
impl Freeze for SerdeContext
impl RefUnwindSafe for SerdeContext
impl Send for SerdeContext
impl Sync for SerdeContext
impl Unpin for SerdeContext
impl UnwindSafe for SerdeContext
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