Skip to main content

ContainerExt

Trait ContainerExt 

Source
pub trait ContainerExt<T> {
    // Required method
    fn ove_push(&mut self, item: T) -> Result<()>;
}
Expand description

Adapter trait that maps a heapless container’s capacity-overflow return into an crate::Error::NoMemory. Use the ove_* methods when you want the result to flow through the same ? chain as other ove::Result calls.

The native heapless API is also available — pick whichever is clearer at the call site. The adapter discards the rejected element on overflow; if you need to recover it, use the underlying push / push_back directly.

Required Methods§

Source

fn ove_push(&mut self, item: T) -> Result<()>

Append item, returning crate::Error::NoMemory when full.

Implementors§

Source§

impl<T, const N: usize> ContainerExt<T> for Deque<T, N>

Source§

impl<T, const N: usize> ContainerExt<T> for Vec<T, N>