pub struct File<T, F>where
T: Merge,{ /* private fields */ }Available on crate feature
file only.Expand description
The File evaluator.
An Evaluator accompanied by its driving logic. If you are trying to use
this crate, this is probably where you should be looking.
§Example
#[derive(Debug, PartialEq, Eq, serde::Deserialize, module::Merge)]
struct MyModule {
a: Option<i32>,
b: Option<Vec<usize>>,
}
let mut file: File<MyModule, format::Json> = File::default();
file.read(PathBuf::from("./module1.json")).unwrap();
file.read(PathBuf::from("./module2.json")).unwrap();
assert_eq!(file.finish(), Some(MyModule {
a: Some(42),
b: Some(vec![0, 1, 2, 3])
}));Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T, F> Freeze for File<T, F>
impl<T, F> RefUnwindSafe for File<T, F>where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F> Send for File<T, F>
impl<T, F> Sync for File<T, F>
impl<T, F> Unpin for File<T, F>
impl<T, F> UnsafeUnpin for File<T, F>where
F: UnsafeUnpin,
T: UnsafeUnpin,
impl<T, F> UnwindSafe for File<T, F>where
F: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more