[][src]Struct taplo::dom::KeyNode

pub struct KeyNode { /* fields omitted */ }

Implementations

impl KeyNode[src]

pub fn idents(&self) -> impl Iterator<Item = &SyntaxToken>[src]

pub fn key_count(&self) -> usize[src]

pub fn keys_str(&self) -> impl Iterator<Item = &str>[src]

pub fn keys_str_stripped(&self) -> impl Iterator<Item = &str>[src]

Quotes are removed from the keys.

pub fn full_key_string_stripped(&self) -> String[src]

pub fn full_key_string(&self) -> String[src]

pub fn is_part_of(&self, other: &KeyNode) -> bool[src]

Determines whether the key starts with the same dotted keys as other.

pub fn contains(&self, other: &KeyNode) -> bool[src]

Determines whether the key starts with the same dotted keys as other.

pub fn skip_left(self, n: usize) -> Self[src]

retains n idents from the left, e.g.: outer.inner => outer there will be at least one ident remaining

pub fn retain_left(self, n: usize) -> Self[src]

skips n idents from the left, e.g.: outer.inner => inner there will be at least one ident remaining

pub fn common_prefix_count(&self, other: &KeyNode) -> usize[src]

Counts the shared prefix keys

pub fn additional_keys(&self) -> &[KeyNode][src]

Keys that are identical to this one but exist somewhere else in the document.

These are created when two dotted keys or arrays of tables are merged.

pub fn text_range(&self) -> TextRange[src]

pub fn text_ranges(&self) -> TextRanges[src]

Trait Implementations

impl Cast for KeyNode[src]

impl Clone for KeyNode[src]

impl Debug for KeyNode[src]

impl Display for KeyNode[src]

impl Eq for KeyNode[src]

impl From<KeyNode> for Node[src]

impl Hash for KeyNode[src]

impl NodeSyntax for KeyNode[src]

impl PartialEq<KeyNode> for KeyNode[src]

impl Rewrite for KeyNode[src]

type Builder = KeyNode

Auto Trait Implementations

impl !RefUnwindSafe for KeyNode

impl !Send for KeyNode

impl !Sync for KeyNode

impl Unpin for KeyNode

impl !UnwindSafe for KeyNode

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> ToString for T where
    T: Display + ?Sized
[src]

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.