CircBuffer

Struct CircBuffer 

Source
pub struct CircBuffer<BUFFER, PAYLOAD>
where BUFFER: 'static,
{ /* private fields */ }

Implementations§

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C1>>
where RxDma<PAYLOAD, C1>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C1>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C2>>
where RxDma<PAYLOAD, C2>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C2>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C3>>
where RxDma<PAYLOAD, C3>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C3>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C4>>
where RxDma<PAYLOAD, C4>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C4>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C5>>
where RxDma<PAYLOAD, C5>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C5>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C6>>
where RxDma<PAYLOAD, C6>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C6>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C7>>
where RxDma<PAYLOAD, C7>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C7>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C1>>
where RxDma<PAYLOAD, C1>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C1>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C2>>
where RxDma<PAYLOAD, C2>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C2>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C3>>
where RxDma<PAYLOAD, C3>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C3>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C4>>
where RxDma<PAYLOAD, C4>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C4>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C5>>
where RxDma<PAYLOAD, C5>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C5>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C6>>
where RxDma<PAYLOAD, C6>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C6>)

Stops the transfer and returns the underlying buffer and RxDma

Source§

impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C7>>
where RxDma<PAYLOAD, C7>: TransferPayload,

Source

pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
where B: AsRef<[T]>, T: Copy,

Reads and removes the available contents of the dma buffer into buf. Returns Err(Error::Overrun) if an overrun is detected but there is no guarantee that every overrun can be detected. On success, returns the number of words written to buf.

Source

pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C7>)

Stops the transfer and returns the underlying buffer and RxDma

Auto Trait Implementations§

§

impl<BUFFER, PAYLOAD> Freeze for CircBuffer<BUFFER, PAYLOAD>
where PAYLOAD: Freeze,

§

impl<BUFFER, PAYLOAD> RefUnwindSafe for CircBuffer<BUFFER, PAYLOAD>
where PAYLOAD: RefUnwindSafe, BUFFER: RefUnwindSafe,

§

impl<BUFFER, PAYLOAD> Send for CircBuffer<BUFFER, PAYLOAD>
where PAYLOAD: Send, BUFFER: Send,

§

impl<BUFFER, PAYLOAD> Sync for CircBuffer<BUFFER, PAYLOAD>
where PAYLOAD: Sync, BUFFER: Sync,

§

impl<BUFFER, PAYLOAD> Unpin for CircBuffer<BUFFER, PAYLOAD>
where PAYLOAD: Unpin,

§

impl<BUFFER, PAYLOAD> !UnwindSafe for CircBuffer<BUFFER, PAYLOAD>

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.