pub trait Loader<T>: Processwhere
T: DeserializeOwned,{
// Required method
fn take(self) -> T;
// Provided methods
fn load_from_str<R: Read>(
&mut self,
input: R,
format: Format,
) -> Result<(), Vec<String>> { ... }
fn load_from_file(
&mut self,
path: &Path,
format: Format,
) -> Result<(), Vec<String>> { ... }
fn load_from_dir(&mut self, path: &Path) -> Result<(), Vec<String>> { ... }
}Expand description
Loader represents the public part of the loading interface. Includes methods for loading
from a file or folder, and accessing the final deserialized T value via the take method.
Required Methods§
Provided Methods§
fn load_from_str<R: Read>( &mut self, input: R, format: Format, ) -> Result<(), Vec<String>>
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.