Struct atat::IngressManager
source · [−]pub struct IngressManager<D, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> where
D: Digester, { /* private fields */ }
Implementations
sourceimpl<D, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> IngressManager<D, BUF_LEN, RES_CAPACITY, URC_CAPACITY> where
D: Digester,
impl<D, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> IngressManager<D, BUF_LEN, RES_CAPACITY, URC_CAPACITY> where
D: Digester,
pub fn new(
res_p: FrameProducer<'static, RES_CAPACITY>,
urc_p: FrameProducer<'static, URC_CAPACITY>,
digester: D
) -> Self
sourcepub fn write(&mut self, data: &[u8])
pub fn write(&mut self, data: &[u8])
Write data into the internal buffer raw bytes being the core type allows the ingress manager to be abstracted over the communication medium.
This function should be called by the UART Rx, either in a receive interrupt, or a DMA interrupt, to move data from the peripheral into the ingress manager receive buffer.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Return the current length of the internal buffer
This can be useful for custom flowcontrol implementations
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns whether the internal buffer is empty
This can be useful for custom flowcontrol implementations
sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Return the capacity of the internal buffer
This can be useful for custom flowcontrol implementations
pub fn digest(&mut self)
Auto Trait Implementations
impl<D, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> !RefUnwindSafe for IngressManager<D, BUF_LEN, RES_CAPACITY, URC_CAPACITY>
impl<D, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> Send for IngressManager<D, BUF_LEN, RES_CAPACITY, URC_CAPACITY> where
D: Send,
impl<D, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> !Sync for IngressManager<D, BUF_LEN, RES_CAPACITY, URC_CAPACITY>
impl<D, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> Unpin for IngressManager<D, BUF_LEN, RES_CAPACITY, URC_CAPACITY> where
D: Unpin,
impl<D, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> !UnwindSafe for IngressManager<D, BUF_LEN, RES_CAPACITY, URC_CAPACITY>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more