Enum steamy_vdf::Entry
[−]
[src]
pub enum Entry { Table(Table), Array(Array), Statement(Statement), Value(Value), }
The kinds of entry.
Variants
Table(Table)
A table.
Array(Array)
An array (entries with the same key).
Statement(Statement)
A statement (the values starting with #).
Value(Value)
A value.
Methods
impl Entry
[src]
fn lookup<S: AsRef<str>>(&self, path: S) -> Option<&Entry>
Lookup an entry with a path.
fn get<S: AsRef<str>>(&self, name: S) -> Option<&Entry>
Try to get the named entry.
fn to<T: Parse>(&self) -> Option<T>
Try to convert the entry to the given type.
fn as_table(&self) -> Option<&Table>
Try to take the entry as a table.
fn as_slice(&self) -> Option<&[Entry]>
Try to take the entry as a slice.
fn as_statement(&self) -> Option<&Statement>
Try to take the entry as a statement.
fn as_value(&self) -> Option<&Value>
Try to take the entry as a value.
fn as_str(&self) -> Option<&str>
Try to take the entry as a string.
Trait Implementations
impl Clone for Entry
[src]
fn clone(&self) -> Entry
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Entry
[src]
fn eq(&self, __arg_0: &Entry) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Entry) -> bool
This method tests for !=
.