Skip to main content

KPrintConfig

Struct KPrintConfig 

Source
#[repr(align(64))]
pub struct KPrintConfig { max_log_level: AtomicU8, log_targets: AtomicU8, }
Expand description

Holds the kernel log configs like max log level and log targets

Fields§

§max_log_level: AtomicU8§log_targets: AtomicU8

Implementations§

Source§

impl KPrintConfig

Source

pub const fn new() -> Self

Constructor; zero-initialize all values.

Important: The zero-initialized values are NOT the correct defaults. Self::init must be called first to load the correct defaults.

Source

pub fn init(&self)

Initialize the inner values to their proper default values

Source

pub fn set_max_log_level(&self, log_level: LogLevel)

Sets the max log level that will be shown by all kprint macro calls

Source

pub fn set_log_targets(&self, log_targets: LogTargets)

Sets the log level targets to which kprint will dispatch log entries

Source

pub fn max_log_level(&self) -> LogLevel

Getter for the current max log level

Source

pub fn log_targets(&self) -> LogTargets

Getter for the current log targets

Auto Trait Implementations§

§

impl !Freeze for KPrintConfig

§

impl RefUnwindSafe for KPrintConfig

§

impl Send for KPrintConfig

§

impl Sync for KPrintConfig

§

impl Unpin for KPrintConfig

§

impl UnsafeUnpin for KPrintConfig

§

impl UnwindSafe for KPrintConfig

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.