[−][src]Struct mininip::datas::tree::Tree
A more user-friendly data-type to represent the data returned by parser::Parser::data
Example
use mininip::datas{Identifier, Value, self}; use datas::tree::Tree; use mininip::parse::parse_file; let tree = Tree::from_data(parse_file("good.ini").unwrap()); for i in tree.sections() { println!("[{}] ; Section {}", i, i); for j in i.keys() { println!("{}={} ; key {}", j.ident().name(), j.value(), j.ident().name()); } }
Methods
impl Tree
[src]
pub fn sections(&self) -> SectionIterator
[src]
Iterates over the sections of a Tree
pub fn get_data(&self) -> &HashMap<Identifier, Value>
[src]
Returns an immutable reference to the owned data
pub fn into_data(self) -> HashMap<Identifier, Value>
[src]
Consumes self
and returns the owned data
Trait Implementations
impl From<HashMap<Identifier, Value, RandomState>> for Tree
[src]
Auto Trait Implementations
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnwindSafe for Tree
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,