[−][src]Struct toml_edit::InlineTable
Type representing a TOML inline table,
payload of the Value::InlineTable
variant
Methods
impl InlineTable
[src]
pub fn len(&self) -> usize
[src]
Returns the number of key/value pairs.
pub fn is_empty(&self) -> bool
[src]
Returns true iff the table is empty.
pub fn iter(&self) -> Box<dyn Iterator<Item = (&'a str, &'a Value)> + 'a>
[src]
Returns an iterator over key/value pairs.
pub fn sort(&mut self)
[src]
Sorts the key/value pairs by key.
pub fn contains_key(&self, key: &str) -> bool
[src]
Returns true iff the table contains given key.
pub fn merge_into(&mut self, other: &mut InlineTable)
[src]
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]
&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]
Auto formats the table.
pub fn remove(&mut self, key: &str) -> Option<Value>
[src]
Removes a key/value pair given the key.
pub fn get(&self, key: &str) -> Option<&Value>
[src]
Return an optional reference to the value at the given the key.
pub 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 TableLike for InlineTable
[src]
fn iter(&self) -> Iter
[src]
fn get<'s>(&'s self, key: &str) -> Option<&'s Item>
[src]
fn len(&self) -> usize
[src]
Returns the number of nonempty items.
fn is_empty(&self) -> bool
[src]
Returns true iff the table is empty.
impl Clone for InlineTable
[src]
fn clone(&self) -> InlineTable
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for InlineTable
[src]
fn default() -> InlineTable
[src]
impl From<InlineTable> for Value
[src]
fn from(table: InlineTable) -> Self
[src]
impl Debug for InlineTable
[src]
impl Display for InlineTable
[src]
Auto Trait Implementations
impl Unpin for InlineTable
impl Sync for InlineTable
impl Send for InlineTable
impl UnwindSafe for InlineTable
impl RefUnwindSafe for InlineTable
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,