pub struct Path { /* private fields */ }Expand description
A path through a type structure, recorded as a series of steps.
This is a lightweight representation that only stores indices.
The actual field names and type information can be reconstructed
by replaying these steps against the original Shape.
Implementations§
Source§impl Path
impl Path
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a path with pre-allocated capacity.
Sourcepub fn format_with_shape(&self, shape: &'static Shape) -> String
pub fn format_with_shape(&self, shape: &'static Shape) -> String
Format this path as a human-readable string by walking the given shape.
Returns a path like outer.inner.items[3].name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
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