pub struct Options { /* private fields */ }Implementations§
Source§impl Options
impl Options
Sourcepub fn with_fs_options(path: Path, fs_option: FsOptions) -> Self
pub fn with_fs_options(path: Path, fs_option: FsOptions) -> Self
Sourcepub fn disable_buf(self) -> Self
pub fn disable_buf(self) -> Self
Disable buffer for the log. It is recommended to keep the buffer enabled and use
Logger::flush to flush the data to the log file.
Sourcepub fn fs(self, fs_option: FsOptions) -> Self
pub fn fs(self, fs_option: FsOptions) -> Self
Set the filesystem options for the log.
See FsOptions for more details.
Sourcepub async fn build<T>(self) -> Result<Logger<T>, LogError>where
T: Encode,
pub async fn build<T>(self) -> Result<Logger<T>, LogError>where
T: Encode,
Open the log file. Return error if open file failed.
Sourcepub async fn build_with_fs<T>(
self,
fs: Arc<dyn DynFs>,
) -> Result<Logger<T>, LogError>where
T: Encode,
pub async fn build_with_fs<T>(
self,
fs: Arc<dyn DynFs>,
) -> Result<Logger<T>, LogError>where
T: Encode,
Open the log with the given DynFs. Return error if open file failed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more