Struct dochy_archiver::ArchiveOptions [−][src]
Customize how we build the archive.
If you need the default value, you can get it with new()
use dochy_archiver::ArchiveOptions; // construct with the default values. // In the default configuration, every file is archived in the folder and the subfolders. let op = ArchiveOptions::new();
If you want to customize, you can use the builder.
Appending "..Default::default()" could make your source code compatible with the future versions of this library.
use dochy_archiver::ArcResult; use dochy_archiver::{ArchiveOptions, ArchiveOptionsBuilder}; fn main() -> ArcResult<()>{ let op = ArchiveOptions::from( ArchiveOptionsBuilder { extensions_archived : vec![".json5"], archive_subfolders : false, ..Default::default() })?; Ok(()) }
Implementations
impl ArchiveOptions
[src]
pub fn is_archived(&self, extension: &str) -> bool
[src]
Should the file with the extension be archived?
pub fn archive_subfolders(&self) -> bool
[src]
Should the subfolders be archived?
pub fn new() -> ArchiveOptions
[src]
construct with the default values. In the default configuration, every file is archived in the folder and the subfolders.
pub fn from(builder: ArchiveOptionsBuilder<'_>) -> ArcResult<ArchiveOptions>
[src]
Construct ArchiveOptions from the builder
Trait Implementations
impl Clone for ArchiveOptions
[src]
fn clone(&self) -> ArchiveOptions
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ArchiveOptions
[src]
Auto Trait Implementations
impl RefUnwindSafe for ArchiveOptions
impl Send for ArchiveOptions
impl Sync for ArchiveOptions
impl Unpin for ArchiveOptions
impl UnwindSafe for ArchiveOptions
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,