pub struct UsbLogger<const N: usize> { /* private fields */ }
Expand description
The logger handle, which contains a pipe with configurable size for buffering log messages.
Implementations§
source§impl<const N: usize> UsbLogger<N>
impl<const N: usize> UsbLogger<N>
sourcepub const fn with_custom_style(
custom_style: fn(_: &Record<'_>, _: &mut Writer<'_, N>),
) -> Self
pub const fn with_custom_style( custom_style: fn(_: &Record<'_>, _: &mut Writer<'_, N>), ) -> Self
Create a new logger instance with a custom formatter.
sourcepub async fn run<'d, D>(
&'d self,
state: &'d mut LoggerState<'d>,
driver: D,
) -> !where
D: Driver<'d>,
Self: 'd,
pub async fn run<'d, D>(
&'d self,
state: &'d mut LoggerState<'d>,
driver: D,
) -> !where
D: Driver<'d>,
Self: 'd,
Run the USB logger using the state and USB driver. Never returns.
sourcepub async fn create_future_from_class<'d, D>(
&'d self,
class: CdcAcmClass<'d, D>,
)where
D: Driver<'d>,
pub async fn create_future_from_class<'d, D>(
&'d self,
class: CdcAcmClass<'d, D>,
)where
D: Driver<'d>,
Creates the futures needed for the logger from a given class This can be used in cases where the usb device is already in use for another connection
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> !Freeze for UsbLogger<N>
impl<const N: usize> !RefUnwindSafe for UsbLogger<N>
impl<const N: usize> Send for UsbLogger<N>
impl<const N: usize> Sync for UsbLogger<N>
impl<const N: usize> Unpin for UsbLogger<N>
impl<const N: usize> UnwindSafe for UsbLogger<N>
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