pub struct Expand<W>(/* private fields */);Expand description
A field of codec W written in place, or as a reference the reader’s
resolver expands into the value W reads. Without a resolver, or when
it keeps the reference, W reads what was written (a field that is
itself a reference — RefTo — reads it as one).
Writing, the binary form and frames carry the value, never the
reference: expansion is a read-time step of a tool that has a resolver
(from_value_with,
from_doc_with,
from_bytes_with). A problem with the
expanded value is reported at the reference’s path.
Trait Implementations§
Source§impl<F, W: With<F>> With<F> for Expand<W>
impl<F, W: With<F>> With<F> for Expand<W>
Source§fn encode(f: &F, w: &mut Writer)
fn encode(f: &F, w: &mut Writer)
The field in the binary form, straight: its value encoded unless
the codec knows better.
Source§fn decode(d: &mut Decoder<'_>) -> Option<F>
fn decode(d: &mut Decoder<'_>) -> Option<F>
The field from the binary form, straight;
None sends the read the
slow way (see Schema::decode).Auto Trait Implementations§
impl<W> Freeze for Expand<W>where
PhantomData<W>: Freeze,
impl<W> RefUnwindSafe for Expand<W>where
PhantomData<W>: RefUnwindSafe,
impl<W> Send for Expand<W>where
PhantomData<W>: Send,
impl<W> Sync for Expand<W>where
PhantomData<W>: Sync,
impl<W> Unpin for Expand<W>where
PhantomData<W>: Unpin,
impl<W> UnsafeUnpin for Expand<W>where
PhantomData<W>: UnsafeUnpin,
impl<W> UnwindSafe for Expand<W>where
PhantomData<W>: UnwindSafe,
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