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 async fn with<F>(
loader: &dyn LoaderInfoProvider,
sender: Sender<RefOp>,
f: F,
) -> F::Outputwhere
F: Future,
Auto Trait Implementations§
impl Freeze for SerdeContext
impl RefUnwindSafe for SerdeContext
impl Send for SerdeContext
impl Sync for SerdeContext
impl Unpin for SerdeContext
impl UnsafeUnpin 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