Trait slr_config::ElementRepr
[−]
[src]
pub trait ElementRepr<'l> { fn from_element(&mut self, elem: &ConfigElement, src: Option<&Source<'l>>) -> Result<(), Vec<Error>>; fn to_element(&self) -> ConfigElement; }
Describes a way to convert a type to a ConfigElement and back.
Required Methods
fn from_element(&mut self, elem: &ConfigElement, src: Option<&Source<'l>>) -> Result<(), Vec<Error>>
Updates the contents of self
based on values in the element.
fn to_element(&self) -> ConfigElement
Creates an element that represents the contents of self
.
Implementors
impl<'l> ElementRepr<'l> for i8
impl<'l> ElementRepr<'l> for i16
impl<'l> ElementRepr<'l> for i32
impl<'l> ElementRepr<'l> for isize
impl<'l> ElementRepr<'l> for u8
impl<'l> ElementRepr<'l> for u16
impl<'l> ElementRepr<'l> for u32
impl<'l> ElementRepr<'l> for usize
impl<'l> ElementRepr<'l> for f32
impl<'l> ElementRepr<'l> for f64
impl<'l> ElementRepr<'l> for String
impl<'l> ElementRepr<'l> for bool
impl<'l, T: ElementRepr<'l> + Default> ElementRepr<'l> for Vec<T>