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]
impl InlineTable
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Returns the number of key/value pairs.
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Returns true iff the table is empty.
pub fn iter(&self) -> Box<Iterator<Item = (&'a str, &'a Value)> + 'a>
[src]
pub fn iter(&self) -> Box<Iterator<Item = (&'a str, &'a Value)> + 'a>
Returns an iterator over key/value pairs.
pub fn sort(&mut self)
[src]
pub fn sort(&mut self)
Sorts the key/value pairs by key.
pub fn contains_key(&self, key: &str) -> bool
[src]
pub fn contains_key(&self, key: &str) -> bool
Returns true iff the table contains given key.
pub fn merge_into(&mut self, other: &mut InlineTable)
[src]
pub fn merge_into(&mut self, other: &mut InlineTable)
Merges the key/value pairs into the other
table leaving
self
empty.
pub fn get_or_insert<V: Into<Value>>(
&mut self,
key: &str,
value: V
) -> &mut Value
[src]
pub fn get_or_insert<V: Into<Value>>(
&mut self,
key: &str,
value: V
) -> &mut Value
Inserts a key/value pair if the table does not contain the key. Returns a mutable reference to the corresponding value.
pub fn fmt(&mut self)
[src]
pub fn fmt(&mut self)
Auto formats the table.
pub fn remove(&mut self, key: &str) -> Option<Value>
[src]
pub fn remove(&mut self, key: &str) -> Option<Value>
Removes a key/value pair given the key.
pub fn get(&self, key: &str) -> Option<&Value>
[src]
pub fn get(&self, key: &str) -> Option<&Value>
Return an optional reference to the value at the given the key.
pub fn get_mut(&mut self, key: &str) -> Option<&mut Value>
[src]
pub fn get_mut(&mut self, key: &str) -> Option<&mut Value>
Return an optional mutable reference to the value at the given the key.
Trait Implementations
impl Display for InlineTable
[src]
impl Display for InlineTable
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<InlineTable> for Value
[src]
impl From<InlineTable> for Value
fn from(table: InlineTable) -> Self
[src]
fn from(table: InlineTable) -> Self
Performs the conversion.
impl Debug for InlineTable
[src]
impl Debug for InlineTable
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for InlineTable
[src]
impl Default for InlineTable
fn default() -> InlineTable
[src]
fn default() -> InlineTable
Returns the "default value" for a type. Read more
impl Clone for InlineTable
[src]
impl Clone for InlineTable
fn clone(&self) -> InlineTable
[src]
fn clone(&self) -> InlineTable
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl TableLike for InlineTable
[src]
impl TableLike for InlineTable
fn iter(&self) -> Iter
[src]
fn iter(&self) -> Iter
Returns an iterator over key/value pairs.
fn get<'s>(&'s self, key: &str) -> Option<&'s Item>
[src]
fn get<'s>(&'s self, key: &str) -> Option<&'s Item>
Returns an optional reference to an item given the key.
fn len(&self) -> usize
[src]
fn len(&self) -> usize
Returns the number of nonempty items.
fn is_empty(&self) -> bool
[src]
fn is_empty(&self) -> bool
Returns true iff the table is empty.
Auto Trait Implementations
impl Send for InlineTable
impl Send for InlineTable
impl Sync for InlineTable
impl Sync for InlineTable