Struct teensy4_bsp::usb::Writer[][src]

pub struct Writer(_);
This is supported on crate feature usb-logging only.
Expand description

A type that can send data to a USB serial host

Use Writer::write to write byte buffers. Or, use the standard write!() macro to serialize data to the writer.

Implementations

Writes raw bytes to the USB serial host

write may return a size smaller than buffer. This indicates that the driver could only write that many elements from the buffer. If it’s important that you write a complete message, you’ll need to retry the call with the rest of the data.

Flush the written USB data

flush may schedule an additional USB transfer to write USB data. However, it will not make your USB data appear to the host faster. You should not call flush in a tight USB writing loop, since the driver will attempt to pack multiple writes into a single USB transfer.

Trait Implementations

Writes a string slice into this writer, returning whether the write succeeded. Read more

Writes a char into this writer, returning whether the write succeeded. Read more

Glue for usage of the write! macro with implementors of this trait. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.