pub enum PathSegment {
MapEntry(PathMapKey),
StructField(&'static str),
SeqElement(usize),
}Expand description
A segment in a path that represents an element of a container in the serialized data.
Variants§
MapEntry(PathMapKey)
The segment is an entry in a map, identified by a map key.
StructField(&'static str)
The segment is a field in a struct, identified by the field name.
SeqElement(usize)
The segment is an element in a sequence or a tuple, identified by its index.
Trait Implementations§
Source§impl Clone for PathSegment
impl Clone for PathSegment
Source§fn clone(&self) -> PathSegment
fn clone(&self) -> PathSegment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathSegment
impl Debug for PathSegment
Source§impl Display for PathSegment
impl Display for PathSegment
Source§impl From<PathMapKey> for PathSegment
impl From<PathMapKey> for PathSegment
Source§fn from(map_key: PathMapKey) -> Self
fn from(map_key: PathMapKey) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PathSegment
impl RefUnwindSafe for PathSegment
impl Send for PathSegment
impl Sync for PathSegment
impl Unpin for PathSegment
impl UnwindSafe for PathSegment
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