Struct weave::SimpleNaming
source · [−]pub struct SimpleNaming { /* private fields */ }
Expand description
The SimpleNaming is a NamingConvention that has a basename, with the main file having a specified extension, the backup file having a “.bak” extension, and the temp files using a numbered extension starting with “.0”. If the names are intended to be compressed, a “.gz” suffix can also be added.
Implementations
sourceimpl SimpleNaming
impl SimpleNaming
Trait Implementations
sourceimpl Clone for SimpleNaming
impl Clone for SimpleNaming
sourcefn clone(&self) -> SimpleNaming
fn clone(&self) -> SimpleNaming
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SimpleNaming
impl Debug for SimpleNaming
sourceimpl NamingConvention for SimpleNaming
impl NamingConvention for SimpleNaming
sourcefn backup_file(&self) -> PathBuf
fn backup_file(&self) -> PathBuf
Return the pathname of the backup file.
sourcefn temp_file(&self) -> Result<(PathBuf, File)>
fn temp_file(&self) -> Result<(PathBuf, File)>
Create a temporary file for writing. Upon success, returns the full path of the file, and the opened File for writing to the file. The path should refer to a new file that did not exist prior to this call. Read more
sourcefn is_compressed(&self) -> bool
fn is_compressed(&self) -> bool
Return if compression is requested on main file.
sourcefn new_temp(&self) -> Result<WriterInfo>
fn new_temp(&self) -> Result<WriterInfo>
Open a possibly compressed temp file, returning a WriterInfo for it. The stream will be buffered, and possibly compressed. Read more
Auto Trait Implementations
impl RefUnwindSafe for SimpleNaming
impl Send for SimpleNaming
impl Sync for SimpleNaming
impl Unpin for SimpleNaming
impl UnwindSafe for SimpleNaming
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more