[][src]Struct taplo::dom::RootNode

pub struct RootNode { /* fields omitted */ }

The root of the DOM.

Constructing it will normalize all the dotted keys, and merge all the tables that need to be merged, and also creates arrays from array of tables. And also semantically validates the tree according to the TOML specification.

If any errors occur, the tree might be missing entries, or will be completely empty.

Syntax errors are not reported, those have to be checked before constructing the DOM.

Implementations

impl RootNode[src]

pub fn query_position(&self, position: TextSize) -> PositionQueryResult<'_>[src]

pub fn iter(&self) -> impl Iterator<Item = (Path, NodeRef<'_>)>[src]

Returns an iterator over all the nodes of the DOM.

impl RootNode[src]

pub fn rewrite<F: Fn(Path, Node) -> RewriteNode + 'static>(
    self,
    rewrite_fn: F
) -> String
[src]

impl RootNode[src]

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

pub fn entries(&self) -> &Entries[src]

pub fn into_entries(self) -> Entries[src]

pub fn errors(&self) -> &[Error][src]

Trait Implementations

impl Cast for RootNode[src]

impl Clone for RootNode[src]

impl Debug for RootNode[src]

impl Display for RootNode[src]

impl Eq for RootNode[src]

impl From<RootNode> for Node[src]

impl Hash for RootNode[src]

impl NodeSyntax for RootNode[src]

impl PartialEq<RootNode> for RootNode[src]

impl StructuralEq for RootNode[src]

impl StructuralPartialEq for RootNode[src]

impl TryFrom<RootNode> for Value[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl !RefUnwindSafe for RootNode

impl !Send for RootNode

impl !Sync for RootNode

impl Unpin for RootNode

impl !UnwindSafe for RootNode

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.