Struct Context
#[repr(C)]pub struct Context {
context_id: Id,
log_level_pos: i32,
log_level_ptr: *mut i8,
trace_status_ptr: *mut i8,
mcnt: u8,
}Expand description
This structure is used for every context used in an application.
Fields§
§context_id: Idcontext id
log_level_pos: i32offset in user-application context field
log_level_ptr: *mut i8pointer to the log level
trace_status_ptr: *mut i8pointer to the trace status
mcnt: u8message counter
Implementations§
§impl Context
impl Context
pub const fn empty() -> Self
pub const fn context_id(&self) -> &Id
pub fn log_level(&self) -> LogLevel
pub fn is_log_level_enabled(&self, level: LogLevel) -> bool
pub fn is_log_level_enabled(&self, level: LogLevel) -> bool
Checks the log level passed by the log function if enabled for that context or not.
This function can be called by applications before generating their logs. Also called before writing new log messages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Unpin for Context
impl UnwindSafe for Context
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