[][src]Struct nbconf::Conf

pub struct Conf {
    pub sections: Vec<Section>,
}

A collection of config sections.

Fields

sections: Vec<Section>

Methods

impl Conf[src]

pub fn new() -> Conf[src]

Create an empty config.

pub fn from_sections(sections: Vec<Section>) -> Conf[src]

Create a pre-populated config.

pub fn parse_str(s: &str) -> Result<Conf, ParseError>[src]

Parse a string into a config.

pub fn to_string(&self) -> String[src]

Serialize the config as a string.

pub fn add_section(&mut self, name: &str, entries: Vec<Entry>)[src]

Append a section to the config.

pub fn section_names(&self) -> Vec<&str>[src]

Get all the sections' names.

Trait Implementations

impl PartialEq<Conf> for Conf[src]

impl Clone for Conf[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for Conf[src]

impl Debug for Conf[src]

Auto Trait Implementations

impl Send for Conf

impl Unpin for Conf

impl Sync for Conf

impl UnwindSafe for Conf

impl RefUnwindSafe for Conf

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]