Struct config_parser::config::ConfigBlock
[−]
[src]
pub struct ConfigBlock { /* fields omitted */ }
Represents a block in the config file or the document root
Methods
impl ConfigBlock
[src]
fn new(
name: String,
params: Vec<String>,
inner: Vec<ConfigBlock>
) -> ConfigBlock
name: String,
params: Vec<String>,
inner: Vec<ConfigBlock>
) -> ConfigBlock
Creates a new ConfigBlock. This probably isn't very useful to you.
fn add_block(&mut self, block: ConfigBlock)
Adds a new sub block. This probably isn't very useful for you
fn matching<'a>(&'a self, name: &'a str) -> ConfigIter<'a>
Returns an iterator of all inner config options with the specified name
fn name(&self) -> &str
Returns the name of the option key
fn inner<'a>(&'a self) -> &'a Vec<ConfigBlock>
Returns all inner config options
fn len(&self) -> usize
Returns the parameter count
fn get(&self, i: usize) -> &str
Returns a parameter. Panics if the parameter index is too high
fn get_opt(&self, i: usize) -> Option<&str>
Returns a parameter. Returns None if the index is too high
Trait Implementations
impl Debug for ConfigBlock
[src]
impl PartialEq for ConfigBlock
[src]
fn eq(&self, __arg_0: &ConfigBlock) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ConfigBlock) -> bool
This method tests for !=
.