[][src]Trait sml::ToSmall

pub trait ToSmall {
    fn to_small(&self, key: &str) -> Result<Small, SmallError>;
}

Types that implement the ToSmall trait can be converted to the Small.

Required methods

fn to_small(&self, key: &str) -> Result<Small, SmallError>

Converts a receiver that implements ToSmall into a Small-formatted string. key can be overridden in the implementation, depending on whether you want to data-structure itself to set the key name or whether you want to context of the Small-formatted string to set the key name.

Loading content...

Implementations on Foreign Types

impl ToSmall for String[src]

impl ToSmall for u32[src]

impl<T> ToSmall for Vec<T> where
    T: ToSmall
[src]

Convert a Vec of some data-structure into a series of lines in a Small-formatted string.

impl<T> ToSmall for Option<T> where
    T: ToSmall
[src]

If Some(T) returns a Small- formatted string. If None returns nothing.

Loading content...

Implementors

Loading content...