[−][src]Struct taplo::dom::Path
Implementations
impl Path
[src]
pub fn new() -> Self
[src]
pub fn without_index(&self) -> Path
[src]
Removes all indices from the path, leaving only keys.
pub fn join<K: Into<PathKey>>(&self, key: K) -> Self
[src]
Creates a new path with a new segment added to the end.
This will clone the underlying storage.
pub fn extend(&self, iter: impl IntoIterator<Item = impl Into<PathKey>>) -> Self
[src]
pub fn keys(&self) -> impl Iterator<Item = &PathKey>
[src]
pub fn dotted(&self) -> String
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn retain_left(&self, n: usize) -> Self
[src]
Returns a new path retaining n keys from the left, e.g.: outer.inner => outer
pub fn skip_left(&self, n: usize) -> Self
[src]
Returns a new path skipping n keys from the left, e.g.: outer.inner => inner
pub fn skip_right(&self, n: usize) -> Self
[src]
Returns a new path skipping n keys from the right, e.g.: outer.inner => outer
pub fn last(&self) -> Option<&PathKey>
[src]
The last key of the path
Trait Implementations
impl Clone for Path
[src]
impl Debug for Path
[src]
impl Default for Path
[src]
impl Eq for Path
[src]
impl<K: Into<PathKey>> FromIterator<K> for Path
[src]
fn from_iter<T: IntoIterator<Item = K>>(iter: T) -> Self
[src]
impl Hash for Path
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl IntoIterator for Path
[src]
type Item = PathKey
The type of the elements being iterated over.
type IntoIter = IntoIter<[PathKey; 10]>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl PartialEq<Path> for Path
[src]
impl StructuralEq for Path
[src]
impl StructuralPartialEq for Path
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Path
impl !Send for Path
impl !Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,