Struct toml_edit::InlineTable
[−]
[src]
pub struct InlineTable { /* fields omitted */ }
Type representing a TOML inline table,
payload of the Value::InlineTable
variant
Methods
impl InlineTable
[src]
fn len(&self) -> usize
[src]
Returns the number of key/value pairs.
fn is_empty(&self) -> bool
[src]
Returns true iff the table is empty.
fn iter(&self) -> Box<Iterator<Item = (&'a str, &'a Value)> + 'a>
[src]
Returns an iterator over key/value pairs.
fn sort(&mut self)
[src]
Sorts the key/value pairs by key.
fn contains_key(&self, key: &str) -> bool
[src]
Returns true iff the table contains given key.
fn merge_into(&mut self, other: &mut InlineTable)
[src]
Merges the key/value pairs into the other
table leaving
self
empty.
fn get_or_insert<V: Into<Value>>(&mut self, key: &str, value: V) -> &mut Value
[src]
Inserts a key/value pair if the table does not contain the key. Returns a mutable reference to the corresponding value.
fn fmt(&mut self)
[src]
Auto formats the table.
fn remove(&mut self, key: &str) -> Option<Value>
[src]
Removes a key/value pair given the key.
fn get(&self, key: &str) -> Option<&Value>
[src]
Return an optional reference to the value at the given the key.
fn get_mut(&mut self, key: &str) -> Option<&mut Value>
[src]
Return an optional mutable reference to the value at the given the key.
Trait Implementations
impl Debug for InlineTable
[src]
impl Default for InlineTable
[src]
fn default() -> InlineTable
[src]
Returns the "default value" for a type. Read more
impl Clone for InlineTable
[src]
fn clone(&self) -> InlineTable
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl TableLike for InlineTable
[src]
fn iter(&self) -> Iter
[src]
Returns an iterator over key/value pairs.
fn get<'s>(&'s self, key: &str) -> Option<&'s Item>
[src]
Returns an optional reference to an item given the key.
fn len(&self) -> usize
[src]
Returns the number of nonempty items.
fn is_empty(&self) -> bool
[src]
Returns true iff the table is empty.