pub trait ObFileDefault: ObFile<HashMap<String, Value>> {
// Required methods
fn from_string_default<P: AsRef<Path>>(
text: &str,
path: Option<P>,
) -> Result<Self, Error>;
fn from_file_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>;
}Expand description
Default implementation using HashMap for properties
Automatically implemented for all ObFile<HashMap<..>> types.
Provides identical interface with explicitly named methods.
Required Methods§
Sourcefn from_string_default<P: AsRef<Path>>(
text: &str,
path: Option<P>,
) -> Result<Self, Error>
fn from_string_default<P: AsRef<Path>>( text: &str, path: Option<P>, ) -> Result<Self, Error>
Same as ObFile::from_string with default properties type
§Errors
Error::InvalidFormatfor malformed frontmatterError::Yamlfor invalid YAML syntax
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.