[−][src]Trait stdbench::config::ParseYaml
Extension for Yaml struct enabling convenient parsing functions for
types that implement FromYaml.
Required methods
fn parse<V: FromYaml>(&self) -> Result<V, Error>
Parse self to V.
fn parse_field<V: FromYaml>(&self, key: &str) -> Result<V, Error>
Parse value at a given key. If does not exist, return error.
fn parse_optional_field<V: FromYaml>(
&self,
key: &str
) -> Result<Option<V>, Error>
&self,
key: &str
) -> Result<Option<V>, Error>
Parse value at a given key. If does not exist, return Ok(None).
It will, however, return an error if the field exists but cannot be parsed,
or if self is not an object with fields.
Implementations on Foreign Types
impl ParseYaml for Yaml[src]
fn parse<V>(&self) -> Result<V, Error> where
V: FromYaml, [src]
V: FromYaml,
fn parse_field<V>(&self, key: &str) -> Result<V, Error> where
V: FromYaml, [src]
V: FromYaml,
fn parse_optional_field<V>(&self, key: &str) -> Result<Option<V>, Error> where
V: FromYaml, [src]
V: FromYaml,