pub struct PathSerializable<'a> { /* private fields */ }Expand description
Wraps a serializable so that it tracks the current path.
Implementations§
Source§impl<'a> PathSerializable<'a>
impl<'a> PathSerializable<'a>
Sourcepub fn wrap(serializable: &'a dyn Serialize) -> PathSerializable<'a>
pub fn wrap(serializable: &'a dyn Serialize) -> PathSerializable<'a>
Wraps another serializable.
Sourcepub fn wrap_ref(serializable: SerializeHandle<'a>) -> PathSerializable<'a>
pub fn wrap_ref(serializable: SerializeHandle<'a>) -> PathSerializable<'a>
Wraps another serializable ref.
Trait Implementations§
Source§impl<'a> Serialize for PathSerializable<'a>
impl<'a> Serialize for PathSerializable<'a>
Source§fn serialize(&self, state: &SerializerState<'_>) -> Result<Chunk<'_>, Error>
fn serialize(&self, state: &SerializerState<'_>) -> Result<Chunk<'_>, Error>
Serializes this serializable.
Source§fn finish(&self, state: &SerializerState<'_>) -> Result<(), Error>
fn finish(&self, state: &SerializerState<'_>) -> Result<(), Error>
Invoked after the serialization finished. Read more
Source§fn is_optional(&self) -> bool
fn is_optional(&self) -> bool
Checks if the current value that would be serialized represents an
optional value. Read more
Source§fn descriptor(&self) -> &dyn Descriptor
fn descriptor(&self) -> &dyn Descriptor
Returns the descriptor of this serializable if it exists.
Auto Trait Implementations§
impl<'a> Freeze for PathSerializable<'a>
impl<'a> !RefUnwindSafe for PathSerializable<'a>
impl<'a> !Send for PathSerializable<'a>
impl<'a> !Sync for PathSerializable<'a>
impl<'a> Unpin for PathSerializable<'a>
impl<'a> !UnwindSafe for PathSerializable<'a>
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