pub enum PathElement<'a> {
Name(&'a str),
Index(usize),
}Expand description
An element within a NormalizedPath
Variants§
Implementations§
Source§impl PathElement<'_>
impl PathElement<'_>
Sourcepub fn as_name(&self) -> Option<&str>
pub fn as_name(&self) -> Option<&str>
Get the underlying name if the PathElement is Name, or None otherwise
Sourcepub fn as_index(&self) -> Option<usize>
pub fn as_index(&self) -> Option<usize>
Get the underlying index if the PathElement is Index, or None otherwise
Sourcepub fn is_name(&self) -> bool
pub fn is_name(&self) -> bool
Test if the PathElement is Name
Sourcepub fn is_index(&self) -> bool
pub fn is_index(&self) -> bool
Test if the PathElement is Index
Trait Implementations§
Source§impl<'a> Clone for PathElement<'a>
impl<'a> Clone for PathElement<'a>
Source§fn clone(&self) -> PathElement<'a>
fn clone(&self) -> PathElement<'a>
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<'a> Debug for PathElement<'a>
impl<'a> Debug for PathElement<'a>
Source§impl Display for PathElement<'_>
impl Display for PathElement<'_>
Source§impl<'a> From<&'a String> for PathElement<'a>
impl<'a> From<&'a String> for PathElement<'a>
Source§impl From<usize> for PathElement<'_>
impl From<usize> for PathElement<'_>
Source§impl Ord for PathElement<'_>
impl Ord for PathElement<'_>
Source§impl PartialEq<&str> for PathElement<'_>
impl PartialEq<&str> for PathElement<'_>
Source§impl PartialEq<str> for PathElement<'_>
impl PartialEq<str> for PathElement<'_>
Source§impl PartialEq<usize> for PathElement<'_>
impl PartialEq<usize> for PathElement<'_>
Source§impl<'a> PartialEq for PathElement<'a>
impl<'a> PartialEq for PathElement<'a>
Source§impl PartialOrd for PathElement<'_>
impl PartialOrd for PathElement<'_>
impl<'a> Eq for PathElement<'a>
impl<'a> StructuralPartialEq for PathElement<'a>
Auto Trait Implementations§
impl<'a> Freeze for PathElement<'a>
impl<'a> RefUnwindSafe for PathElement<'a>
impl<'a> Send for PathElement<'a>
impl<'a> Sync for PathElement<'a>
impl<'a> Unpin for PathElement<'a>
impl<'a> UnwindSafe for PathElement<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.