Struct taplo::dom::Path[][src]

pub struct Path { /* fields omitted */ }

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]

impl Hash for Path[src]

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?

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.