Enum toml_edit::Item[][src]

pub enum Item {
    None,
    Value(Value),
    Table(Table),
    ArrayOfTables(ArrayOfTables),
}
Expand description

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.

Implementations

Sets self to the given item iff self is none and returns a mutable reference to self.

Downcasting

Casts self to value.

Casts self to table.

Casts self to array of tables.

Casts self to mutable value.

Casts self to mutable table.

Casts self to mutable array of tables.

Returns true iff self is a value.

Returns true iff self is a table.

Returns true iff self is an array of tables.

Returns true iff self is None.

Casts self to integer.

Returns true iff self is an integer.

Casts self to float.

Returns true iff self is a float.

Casts self to boolean.

Returns true iff self is a boolean.

Casts self to str.

Returns true iff self is a string.

Casts self to date-time.

Returns true iff self is a date-time.

Casts self to array.

Casts self to mutable array.

Returns true iff self is an array.

Casts self to inline table.

Casts self to mutable inline table.

Returns true iff self is an inline table.

Casts self to either a table or an inline table.

Returns true iff self is either a table, or an inline table.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.