embassy-usb

Crates

git

Versions

default

Flavors

Skip to main content

Writer

Struct Writer 

Source
pub struct Writer<'dev, 'd, A, M>
where A: UsbHostAllocator<'d>, M: RawMutex,
{ /* private fields */ }
Expand description

Port writer half.

Implementations§

Source§

impl<'dev, 'd, A, M> Writer<'dev, 'd, A, M>
where A: UsbHostAllocator<'d>, M: RawMutex,

Source

pub async fn write(&mut self, data: &[u8]) -> Result<usize, Ch34xError>

Write bytes to the port.

Trait Implementations§

Source§

impl<'dev, 'd, A, M> ErrorType for Writer<'dev, 'd, A, M>
where A: UsbHostAllocator<'d>, M: RawMutex,

Available on crate feature embedded-io only.
Source§

type Error = Ch34xError

Error type of all the IO operations on this type.
Source§

impl<'dev, 'd, A, M> Write for Writer<'dev, 'd, A, M>
where A: UsbHostAllocator<'d>, M: RawMutex,

Available on crate feature embedded-io only.
Source§

async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>

Write a buffer into this writer, returning how many bytes were written. Read more
Source§

async fn flush(&mut self) -> Result<(), Self::Error>

Flush this output stream, ensuring that all intermediately buffered contents reach their destination.
Source§

async fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::Error>

Write an entire buffer into this writer. Read more

Auto Trait Implementations§

§

impl<'dev, 'd, A, M> !RefUnwindSafe for Writer<'dev, 'd, A, M>

§

impl<'dev, 'd, A, M> !UnwindSafe for Writer<'dev, 'd, A, M>

§

impl<'dev, 'd, A, M> Forget for Writer<'dev, 'd, A, M>

§

impl<'dev, 'd, A, M> Freeze for Writer<'dev, 'd, A, M>
where &'dev Ch34xDevice<'d, A, M>: Freeze, <A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: Freeze,

§

impl<'dev, 'd, A, M> Move for Writer<'dev, 'd, A, M>

§

impl<'dev, 'd, A, M> Send for Writer<'dev, 'd, A, M>
where &'dev Ch34xDevice<'d, A, M>: Send, <A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: Send,

§

impl<'dev, 'd, A, M> Sync for Writer<'dev, 'd, A, M>
where &'dev Ch34xDevice<'d, A, M>: Sync, <A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: Sync,

§

impl<'dev, 'd, A, M> Unpin for Writer<'dev, 'd, A, M>
where &'dev Ch34xDevice<'d, A, M>: Unpin, <A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: Unpin,

§

impl<'dev, 'd, A, M> UnsafeUnpin for Writer<'dev, 'd, A, M>
where &'dev Ch34xDevice<'d, A, M>: UnsafeUnpin, <A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: UnsafeUnpin,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = !

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.