pub struct FileConfig { /* private fields */ }Available on crate feature
file only.Expand description
File output configuration.
Implementations§
Source§impl FileConfig
impl FileConfig
Sourcepub fn new(directory: impl Into<PathBuf>) -> Self
pub fn new(directory: impl Into<PathBuf>) -> Self
Create a file configuration rooted in directory.
Sourcepub fn with_latest_file_name(self, file_name: impl Into<String>) -> Self
pub fn with_latest_file_name(self, file_name: impl Into<String>) -> Self
Change the path used for the rolling “latest” session file.
Sourcepub fn with_session_file_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_session_file_prefix(self, prefix: impl Into<String>) -> Self
Prefix the generated session file name.
With prefix app, session files look like app-2026-05-25_14-22-10.log.
Sourcepub fn latest_file_name(&self) -> &str
pub fn latest_file_name(&self) -> &str
Return the configured latest file name.
Sourcepub fn session_file_prefix(&self) -> Option<&str>
pub fn session_file_prefix(&self) -> Option<&str>
Return the configured session prefix, if any.
Trait Implementations§
Source§impl Clone for FileConfig
impl Clone for FileConfig
Source§fn clone(&self) -> FileConfig
fn clone(&self) -> FileConfig
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 moreSource§impl Debug for FileConfig
impl Debug for FileConfig
Source§impl PartialEq for FileConfig
impl PartialEq for FileConfig
Source§fn eq(&self, other: &FileConfig) -> bool
fn eq(&self, other: &FileConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for FileConfig
impl StructuralPartialEq for FileConfig
Auto Trait Implementations§
impl Freeze for FileConfig
impl RefUnwindSafe for FileConfig
impl Send for FileConfig
impl Sync for FileConfig
impl Unpin for FileConfig
impl UnsafeUnpin for FileConfig
impl UnwindSafe for FileConfig
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