pub struct FieldPath { /* private fields */ }Expand description
A path through the type tree to a field.
Implementations§
Source§impl FieldPath
impl FieldPath
Sourcepub fn push_field(&self, name: &'static str) -> FieldPath
pub fn push_field(&self, name: &'static str) -> FieldPath
Push a field segment onto the path.
Sourcepub fn push_variant(
&self,
field_name: &'static str,
variant_name: &'static str,
) -> FieldPath
pub fn push_variant( &self, field_name: &'static str, variant_name: &'static str, ) -> FieldPath
Push a variant segment onto the path.
Sourcepub fn segments(&self) -> &[PathSegment]
pub fn segments(&self) -> &[PathSegment]
Get the segments of this path.
Sourcepub fn last(&self) -> Option<&PathSegment>
pub fn last(&self) -> Option<&PathSegment>
Get the last segment, if any.
Trait Implementations§
Source§impl Ord for FieldPath
impl Ord for FieldPath
Source§impl PartialOrd for FieldPath
impl PartialOrd for FieldPath
impl Eq for FieldPath
impl StructuralPartialEq for FieldPath
Auto Trait Implementations§
impl Freeze for FieldPath
impl RefUnwindSafe for FieldPath
impl Send for FieldPath
impl Sync for FieldPath
impl Unpin for FieldPath
impl UnwindSafe for FieldPath
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