TomlDoc

Struct TomlDoc 

Source
pub struct TomlDoc { /* private fields */ }

Implementations§

Source§

impl TomlDoc

Source

pub fn start_edit(&mut self)

Source

pub fn set_smart_ws(&mut self, smart: bool)

Source

pub fn finish_edit_no_reparse(&mut self)

Source

pub fn finish_edit_full_reparse(&mut self)

Source

pub fn insert(&mut self, what: impl Into<CstNode>, where_: Position)

Source

pub fn replace( &mut self, what: impl Into<CstNode>, replacement: impl Into<CstNode>, )

Source

pub fn detach(&mut self, what: impl Into<CstNode>)

Source

pub fn swap(&mut self, node1: impl Into<CstNode>, node2: impl Into<CstNode>)

Source

pub fn new_key(&mut self, name: &str) -> Key

Source

pub fn new_value_from_text(&mut self, text: &str) -> Value

Source

pub fn new_value(&mut self, val: impl IntoValue) -> Value

Source

pub fn new_value_dict(&mut self, entries: impl Iterator<Item = Entry>) -> Value

Source

pub fn new_value_array(&mut self, entries: impl Iterator<Item = Value>) -> Value

Source

pub fn new_dict_from_text(&mut self, text: &str) -> Dict

Source

pub fn new_entry_from_text(&mut self, text: &str) -> Entry

Source

pub fn new_entry( &mut self, keys: impl Iterator<Item = Key>, value: Value, ) -> Entry

Source

pub fn new_doc_from_text(&mut self, text: &str) -> Doc

Source

pub fn new_table_from_text(&mut self, text: &str) -> Table

Source

pub fn new_table( &mut self, keys: impl Iterator<Item = Key>, entries: impl Iterator<Item = Entry>, ) -> Table

Source

pub fn new_array_table_from_text(&mut self, text: &str) -> ArrayTable

Source

pub fn new_array_table( &mut self, keys: impl Iterator<Item = Key>, entries: impl Iterator<Item = Entry>, ) -> ArrayTable

Source

pub fn new_whitespace(&mut self, ws: &str) -> CstNode

Source

pub fn new_comma(&mut self) -> CstNode

Source§

impl TomlDoc

Source

pub fn new(text: &str) -> TomlDoc

Source

pub fn cst(&self) -> CstNode

Source

pub fn ast(&self) -> Doc

Source

pub fn errors(&self) -> Vec<SyntaxError>

Source

pub fn debug(&self) -> String

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.