Struct slr_config::ConfigElement [] [src]

pub struct ConfigElement {
    // some fields omitted
}

A configuration element.

Methods

impl ConfigElement
[src]

fn new_table() -> ConfigElement

Creates a new empty table.

fn new_value<T: ToString>(value: T) -> ConfigElement

Creates a new value.

fn new_array() -> ConfigElement

Creates a new array.

fn from_source<'l>(source: &'l mut Source<'l>) -> Result<ConfigElement, Error>

Parses a source and returns a table.

fn from_str(src: &str) -> Result<ConfigElement, Error>

Parses a source and returns a table.

fn from_source_with_init<'l>(&mut self, source: &'l mut Source<'l>) -> Result<(), Error>

fn from_str_with_init(&mut self, src: &str) -> Result<(), Error>

fn kind(&self) -> &ConfigElementKind

fn span(&self) -> Span

fn as_table(&self) -> Option<&BTreeMap<StringConfigElement>>

fn as_table_mut(&mut self) -> Option<&mut BTreeMap<StringConfigElement>>

fn as_value(&self) -> Option<&String>

fn as_value_mut(&mut self) -> Option<&mut String>

fn as_array(&self) -> Option<&Vec<ConfigElement>>

fn as_array_mut(&mut self) -> Option<&mut Vec<ConfigElement>>

fn insert<T: ToString>(&mut self, name: T, elem: ConfigElement)

fn print<W: Write>(&self, name: Option<&str>, is_root: bool, p: &mut Printer<W>) -> Result<()Error>

Trait Implementations

impl Clone for ConfigElement
[src]

fn clone(&self) -> ConfigElement

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 Display for ConfigElement
[src]

fn fmt(&self, formatter: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.