Struct figment::providers::Yaml [−][src]
pub struct Yaml;
This is supported on crate feature
yaml
only.Expand description
A YAML Format
Data
provider. See Data
for details.
use figment::providers::{Format, Yaml}; // Source directly from a source string... let provider = Yaml::string("source-string"); // Or read from a file on disk. let provider = Yaml::file("path-to-file");
See also serde_yaml::from_str
for parsing details.
Trait Implementations
Parses string
as the data format Self
as a T
or returns an error
if the string
is an invalid T
. Read more
Parses the file at path
as the data format Self
as a T
or returns
an error if the string
is an invalid T
. The default implementation
calls Format::from_str()
with the contents of the file. Read more
Returns a Data
provider that sources its values by parsing the file at
path
as format Self
. See Data::file()
for more details. The
default implementation calls Data::file(path)
. Read more
Auto Trait Implementations
impl RefUnwindSafe for Yaml
impl UnwindSafe for Yaml