pub struct Path { /* private fields */ }
Implementations§
Source§impl Path
impl Path
pub fn first_key_path(&self) -> Option<&String>
pub fn first_index_path(&self) -> Option<&usize>
pub fn get(&self, index: usize) -> Option<&PathElement>
pub fn get_elements(&self) -> &Vec<PathElement>
pub fn get_mut_elements(&mut self) -> &mut Vec<PathElement>
pub fn get_key_at(&self, index: usize) -> Option<&String>
pub fn get_index_at(&self, index: usize) -> Option<&usize>
pub fn last(&self) -> Option<&PathElement>
pub fn replace( &mut self, index: usize, path_elem: PathElement, ) -> Option<PathElement>
pub fn increase_index(&mut self, index: usize) -> bool
pub fn decrease_index(&mut self, index: usize) -> bool
pub fn split_at(&self, mid: usize) -> (Path, Path)
pub fn max_common_path(&self, path: &Path) -> Path
pub fn common_path_prefix(&self, path: &Path) -> Path
pub fn is_empty(&self) -> bool
pub fn is_prefix_of(&self, path: &Path) -> bool
pub fn len(&self) -> usize
pub fn next_level(&self) -> Path
Trait Implementations§
impl StructuralPartialEq for Path
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more