pub struct State {
pub options: LogOptions,
/* private fields */
}Fields§
§options: LogOptionsImplementations§
Source§impl State
impl State
pub fn new(module: Module, options: LogOptions) -> Self
Sourcepub fn cont_buffered_log(&self, text: &str)
pub fn cont_buffered_log(&self, text: &str)
Append more text to the previously buffered log.
The text may or may not end with a newline.
§Panics
Panics if the internal mutex is poisoned.
Sourcepub fn buffer_non_cont(&self, level: ggml_log_level, text: &str)
pub fn buffer_non_cont(&self, level: ggml_log_level, text: &str)
Start buffering a message. Not the CONT log level and text is missing a newline.
§Panics
Panics if the internal mutex is poisoned.
Sourcepub fn emit_non_cont_line(&self, level: ggml_log_level, text: &str)
pub fn emit_non_cont_line(&self, level: ggml_log_level, text: &str)
Emit a normal unbuffered log message (not the CONT log level and the text ends with a newline).
§Panics
Panics if the internal mutex is poisoned.
pub fn update_previous_level_for_disabled_log(&self, level: ggml_log_level)
Sourcepub fn is_enabled_for_level(&self, level: ggml_log_level) -> bool
pub fn is_enabled_for_level(&self, level: ggml_log_level) -> bool
Checks whether the given log level is enabled by the current tracing subscriber. CONT lines inherit the previous line’s level rather than being checked on their own.
Auto Trait Implementations§
impl !Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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> 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