Trait uavcan::storage::SubscriberStorageHandle [−][src]
pub trait SubscriberStorageHandle<F: TransferFrame> { fn remove(&self, identifier: &TransferFrameID) -> Option<F>; fn find_id<P>(&self, predicate: P) -> Option<FullTransferID>
where
P: FnMut(&F) -> bool; fn retain<P>(&self, predicate: P)
where
P: FnMut(&F) -> bool; }
Required Methods
fn remove(&self, identifier: &TransferFrameID) -> Option<F>
Remove and return the next frame matching the indentifier if such frame exist.
It's important that receive
returns frames in the correct order.
fn find_id<P>(&self, predicate: P) -> Option<FullTransferID> where
P: FnMut(&F) -> bool,
P: FnMut(&F) -> bool,
Finds the first element matching the predicate and returns its TransferFrameID
.
fn retain<P>(&self, predicate: P) where
P: FnMut(&F) -> bool,
P: FnMut(&F) -> bool,
Retains only the elements specified by the predicate.
In other words, remove all elements e such that f(&e)
returns false.
This method must operate in place and preserves the order of the retained elements.