pub struct GenerateOptions {
pub specs: Vec<PathBuf>,
pub oldconfig: Option<PathBuf>,
pub output: Option<PathBuf>,
pub fmt: OutputFormat,
pub writes: Vec<String>,
pub keep_backup: bool,
}Expand description
Options for loading, merging, updating, and writing config files.
Fields§
§specs: Vec<PathBuf>Config specification files merged in order.
oldconfig: Option<PathBuf>Optional old config used to preserve existing values.
output: Option<PathBuf>Optional output file. If absent, generated text is returned only.
fmt: OutputFormatOutput format.
writes: Vec<String>Values to override after specs and oldconfig are loaded.
keep_backup: boolWhether to keep a .old.* backup when overwriting a changed output file.
Implementations§
Source§impl GenerateOptions
impl GenerateOptions
Sourcepub fn new(specs: impl IntoIterator<Item = PathBuf>) -> Self
pub fn new(specs: impl IntoIterator<Item = PathBuf>) -> Self
Create TOML generation options from config specification paths.
Trait Implementations§
Source§impl Clone for GenerateOptions
impl Clone for GenerateOptions
Source§fn clone(&self) -> GenerateOptions
fn clone(&self) -> GenerateOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GenerateOptions
impl RefUnwindSafe for GenerateOptions
impl Send for GenerateOptions
impl Sync for GenerateOptions
impl Unpin for GenerateOptions
impl UnsafeUnpin for GenerateOptions
impl UnwindSafe for GenerateOptions
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