Enum deser::ser::SerializeHandle
source · [−]Expand description
A handle to a Serialize type.
During serialization it common to be in a situation where one needs to
return locally constructed Serialize. This is where
SerializeHandle comes in. In cases where the Serialize cannot
be borrowed it can be boxed up inside the handle.
The equivalent for deserialization is the
SinkHandle.
Variants
Borrowed(&'a dyn Serialize)
A borrowed reference to a Serialize.
Owned(Box<dyn Serialize + 'a>)
A boxed up Serialize.
Implementations
sourceimpl<'a> SerializeHandle<'a>
impl<'a> SerializeHandle<'a>
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for SerializeHandle<'a>
impl<'a> !Send for SerializeHandle<'a>
impl<'a> !Sync for SerializeHandle<'a>
impl<'a> Unpin for SerializeHandle<'a>
impl<'a> !UnwindSafe for SerializeHandle<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more