[−][src]Trait sml::FromSmall
Types that implement the FromSmall
trait can be constructed from a Small
-formatted string.
Required methods
fn from_small(slice: &Small) -> Result<Self, SmallError> where
Self: Sized,
Self: Sized,
The from_small()
function describes how to create a data-structure from the parts of
Small
. See example 1 for canonical usage.
Provided methods
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
Self: Sized,
Reduces Small
to the key_path
and then uses the FromSmall
trait to convert to the
receiver type.
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
Self: Sized,
Top level function that converts a Small
-formatted string into the receiver.
fn from_str_debug(s: &str) -> Self where
Self: Sized,
Self: Sized,
Top level function that converts a SmallString
-formatted string into the receiver giving
helpful error messages for debugging.
Implementations on Foreign Types
impl FromSmall for String
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for u8
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for i8
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for u16
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for i16
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for u32
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for i32
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for u64
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for i64
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for u128
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for i128
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for usize
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for isize
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for f32
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for f64
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl FromSmall for bool
[src]
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl<T> FromSmall for Option<T> where
T: FromSmall,
[src]
T: FromSmall,
Converts a Vec
with either one or no Small
elements to an Option<T>
. See Example 1 for
details.
fn from_small(small: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
impl<T> FromSmall for Vec<T> where
T: FromSmall,
[src]
T: FromSmall,
Converts a Vec
of Small
elements to a Vec<T>
. See Example 1 for details.
fn from_small(sr: &Small) -> Result<Self, SmallError>
[src]
fn path(small: &Small, key_path: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str(s: &str) -> Result<Self, SmallError> where
Self: Sized,
[src]
Self: Sized,
fn from_str_debug(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,