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)
Tuple Fields
0: Value
Type representing value.
Table(Table)
Tuple Fields
0: Table
Type representing table.
ArrayOfTables(ArrayOfTables)
Tuple Fields
Type representing array of tables.
Implementations
Downcasting
Index into a TOML array or map. A string index can be used to access a value in a map, and a usize index can be used to access an element of an array.
Returns None
if:
- The type of
self
does not match the type of the index, for example if the index is a string andself
is an array or a number. - The given key does not exist in the map or the given index is not within the bounds of the array.
Mutably index into a TOML array or map. A string index can be used to access a value in a map, and a usize index can be used to access an element of an array.
Returns None
if:
- The type of
self
does not match the type of the index, for example if the index is a string andself
is an array or a number. - The given key does not exist in the map or the given index is not within the bounds of the array.
Casts self
to array of tables.
Casts self
to mutable value.
Casts self
to mutable table.
Casts self
to mutable array of tables.
Casts self
to value.
In-place convert to a value
Casts self
to table.
Casts self
to array of tables.
Returns true iff self
is an array of tables.
Casts self
to integer.
Returns true iff self
is an integer.
Casts self
to date-time.
Returns true iff self
is a date-time.
Casts self
to mutable 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.
Casts self
to either a table or an inline table.
Returns true iff self
is either a table, or an inline table.
Trait Implementations
The error type that can be returned if some error occurs during deserialization. Read more
Require the Deserializer
to figure out how to drive the visitor based
on what data type is in the input. Read more
Hint that the Deserialize
type is expecting an optional value. Read more
Hint that the Deserialize
type is expecting a newtype struct with a
particular name. Read more
fn deserialize_enum<V>(
self,
name: &'static str,
variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Error> where
V: Visitor<'de>,
fn deserialize_enum<V>(
self,
name: &'static str,
variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Error> where
V: Visitor<'de>,
Hint that the Deserialize
type is expecting an enum value with a
particular name and possible variants. Read more
Hint that the Deserialize
type is expecting a bool
value.
Hint that the Deserialize
type is expecting a u8
value.
Hint that the Deserialize
type is expecting a u16
value.
Hint that the Deserialize
type is expecting a u32
value.
Hint that the Deserialize
type is expecting a u64
value.
Hint that the Deserialize
type is expecting an i8
value.
Hint that the Deserialize
type is expecting an i16
value.
Hint that the Deserialize
type is expecting an i32
value.
Hint that the Deserialize
type is expecting an i64
value.
Hint that the Deserialize
type is expecting a f32
value.
Hint that the Deserialize
type is expecting a f64
value.
Hint that the Deserialize
type is expecting a char
value.
Hint that the Deserialize
type is expecting a string value and does
not benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
Hint that the Deserialize
type is expecting a string value and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
Hint that the Deserialize
type is expecting a sequence of values.
Hint that the Deserialize
type is expecting a byte array and does not
benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
Hint that the Deserialize
type is expecting a byte array and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
Hint that the Deserialize
type is expecting a map of key-value pairs.
Hint that the Deserialize
type is expecting a unit value.
fn deserialize_struct<V>(
self,
name: &'static str,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
fn deserialize_struct<V>(
self,
name: &'static str,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a struct with a particular
name and fields. Read more
Hint that the Deserialize
type needs to deserialize a value whose type
doesn’t matter because it is ignored. Read more
Hint that the Deserialize
type is expecting a unit struct with a
particular name. Read more
Hint that the Deserialize
type is expecting a tuple struct with a
particular name and number of fields. Read more
Hint that the Deserialize
type is expecting a sequence of values and
knows how many values there are without looking at the serialized data. Read more
Hint that the Deserialize
type is expecting the name of a struct
field or the discriminant of an enum variant. Read more
Hint that the Deserialize
type is expecting an i128
value. Read more
Hint that the Deserialize
type is expecting an u128
value. Read more
Determine whether Deserialize
implementations should expect to
deserialize their human-readable form. Read more
type Deserializer = Self
type Deserializer = Self
The type of the deserializer being converted into.
Convert this value into a deserializer.
Auto Trait Implementations
impl RefUnwindSafe for Item
impl UnwindSafe for Item
Blanket Implementations
Mutably borrows from an owned value. Read more