Trait ObFileDefault

Source
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§

Source

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
Source

fn from_file_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>

Same as ObFile::from_file with default properties type

§Errors

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.

Implementors§

Source§

impl<T> ObFileDefault for T
where T: ObFile<HashMap<String, Value>>,