pub struct FileOptions {
pub paths: Vec<PathBuf>,
pub error_if_not_found: bool,
pub loader: Box<dyn FileLoader>,
}Available on crate feature
file only.Expand description
Options for loading configuration from a file.
Users must supply a FileLoader implementation that knows how to
parse the file contents.
Use serde_loader for any serde-compatible format.
Fields§
§paths: Vec<PathBuf>List of file paths to search. The first one found is used.
error_if_not_found: boolIf true, return an error if no config file is found.
loader: Box<dyn FileLoader>The loader that parses file contents into configuration values.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FileOptions
impl !UnwindSafe for FileOptions
impl Freeze for FileOptions
impl Send for FileOptions
impl Sync for FileOptions
impl Unpin for FileOptions
impl UnsafeUnpin for FileOptions
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