Enum toml_edit::Item
[−]
[src]
pub enum Item { None, Value(Value), Table(Table), ArrayOfTables(ArrayOfTables), }
Type representing either a value, a table, an array of tables, or none.
Variants
None
Type representing none.
Value(Value)
Type representing value.
Table(Table)
Type representing table.
ArrayOfTables(ArrayOfTables)
Type representing array of tables.
Methods
impl Item
[src]
fn or_insert(&mut self, item: Item) -> &mut Item
[src]
Sets self
to the given item iff self
is none and
returns a mutable reference to self
.
impl Item
[src]
Downcasting
fn as_value(&self) -> Option<&Value>
[src]
Casts self
to value.
fn as_table(&self) -> Option<&Table>
[src]
Casts self
to table.
fn as_array_of_tables(&self) -> Option<&ArrayOfTables>
[src]
Casts self
to array of tables.
fn as_value_mut(&mut self) -> Option<&mut Value>
[src]
Casts self
to mutable value.
fn as_table_mut(&mut self) -> Option<&mut Table>
[src]
Casts self
to mutable table.
fn as_array_of_tables_mut(&mut self) -> Option<&mut ArrayOfTables>
[src]
Casts self
to mutable array of tables.
fn is_value(&self) -> bool
[src]
Returns true iff self
is a value.
fn is_table(&self) -> bool
[src]
Returns true iff self
is a table.
fn is_array_of_tables(&self) -> bool
[src]
Returns true iff self
is an array of tables.
fn is_none(&self) -> bool
[src]
Returns true iff self
is None
.
fn as_integer(&self) -> Option<i64>
[src]
Casts self
to integer.
fn is_integer(&self) -> bool
[src]
Returns true iff self
is an integer.
fn as_float(&self) -> Option<f64>
[src]
Casts self
to float.
fn is_float(&self) -> bool
[src]
Returns true iff self
is a float.
fn as_bool(&self) -> Option<bool>
[src]
Casts self
to boolean.
fn is_bool(&self) -> bool
[src]
Returns true iff self
is a boolean.
fn as_str(&self) -> Option<&str>
[src]
Casts self
to str.
fn is_str(&self) -> bool
[src]
Returns true iff self
is a string.
fn as_date_time(&self) -> Option<&DateTime>
[src]
Casts self
to date-time.
fn is_date_time(&self) -> bool
[src]
Returns true iff self
is a date-time.
fn as_array(&self) -> Option<&Array>
[src]
Casts self
to array.
fn as_array_mut(&mut self) -> Option<&mut Array>
[src]
Casts self
to mutable array.
fn is_array(&self) -> bool
[src]
Returns true iff self
is an array.
fn as_inline_table(&self) -> Option<&InlineTable>
[src]
Casts self
to inline table.
fn as_inline_table_mut(&mut self) -> Option<&mut InlineTable>
[src]
Casts self
to mutable inline table.
fn is_inline_table(&self) -> bool
[src]
Returns true iff self
is an inline table.
fn as_table_like(&self) -> Option<&TableLike>
[src]
Casts self
to either a table or an inline table.
fn is_table_like(&self) -> bool
[src]
Returns true iff self
is either a table, or an inline table.
Trait Implementations
impl Debug for Item
[src]
impl Clone for Item
[src]
fn clone(&self) -> Item
[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 Default for Item
[src]
impl<I> Index<I> for Item where
I: Index,
[src]
I: Index,
type Output = Item
The returned type after indexing.
fn index(&self, index: I) -> &Item
[src]
Performs the indexing (container[index]
) operation.
impl<I> IndexMut<I> for Item where
I: Index,
[src]
I: Index,