toml_query::value

Trait TomlValueExt

Source
pub trait TomlValueExt<'doc>:
    TomlValueReadExt<'doc>
    + TomlValueSetExt
    + TomlValueDeleteExt
    + TomlValueInsertExt {
    // Provided methods
    fn read_with_seperator(
        &'doc self,
        query: &str,
        sep: char,
    ) -> Result<Option<&'doc Value>> { ... }
    fn read_mut_with_seperator(
        &'doc mut self,
        query: &str,
        sep: char,
    ) -> Result<Option<&'doc mut Value>> { ... }
    fn read(&'doc self, query: &str) -> Result<Option<&'doc Value>> { ... }
    fn read_mut(&'doc mut self, query: &str) -> Result<Option<&'doc mut Value>> { ... }
    fn set_with_seperator(
        &mut self,
        query: &str,
        sep: char,
        value: Value,
    ) -> Result<Option<Value>> { ... }
    fn set(&mut self, query: &str, value: Value) -> Result<Option<Value>> { ... }
    fn delete_with_seperator(
        &mut self,
        query: &str,
        sep: char,
    ) -> Result<Option<Value>> { ... }
    fn delete(&mut self, query: &str) -> Result<Option<Value>> { ... }
    fn insert_with_seperator(
        &mut self,
        query: &str,
        sep: char,
        value: Value,
    ) -> Result<Option<Value>> { ... }
    fn insert(&mut self, query: &str, value: Value) -> Result<Option<Value>> { ... }
}
Expand description

Conveniance trait over

  • TomlValueReadExt
  • TomlValueSetExt

for ease of use.

The very same goal can be achieved by importing each trait seperately.

Provided Methods§

Source

fn read_with_seperator( &'doc self, query: &str, sep: char, ) -> Result<Option<&'doc Value>>

See documentation of TomlValueReadExt

Source

fn read_mut_with_seperator( &'doc mut self, query: &str, sep: char, ) -> Result<Option<&'doc mut Value>>

See documentation of TomlValueReadExt

Source

fn read(&'doc self, query: &str) -> Result<Option<&'doc Value>>

See documentation of TomlValueReadExt

Source

fn read_mut(&'doc mut self, query: &str) -> Result<Option<&'doc mut Value>>

See documentation of TomlValueReadExt

Source

fn set_with_seperator( &mut self, query: &str, sep: char, value: Value, ) -> Result<Option<Value>>

See documentation of TomlValueSetExt

Source

fn set(&mut self, query: &str, value: Value) -> Result<Option<Value>>

See documentation of TomlValueSetExt

Source

fn delete_with_seperator( &mut self, query: &str, sep: char, ) -> Result<Option<Value>>

See documentation of TomlValueDeleteExt

Source

fn delete(&mut self, query: &str) -> Result<Option<Value>>

See documentation of TomlValueDeleteExt

Source

fn insert_with_seperator( &mut self, query: &str, sep: char, value: Value, ) -> Result<Option<Value>>

See documentation of TomlValueInsertExt

Source

fn insert(&mut self, query: &str, value: Value) -> Result<Option<Value>>

See documentation of TomlValueInsertExt

Implementations on Foreign Types§

Source§

impl<'doc> TomlValueExt<'doc> for Value

Implementors§