Struct canadensis::requester::TransferIdFixedMap
source · [−]Expand description
A fixed-capacity map from destination node IDs to transfer IDs of the next transfer
This map has a limited capacity and will return an error if asked to keep track of transfer IDs for too many nodes.
C must be a power of two. Other values may cause incorrect behavior.
Trait Implementations
sourceimpl<T: Transport, const C: usize> Default for TransferIdFixedMap<T, C>
impl<T: Transport, const C: usize> Default for TransferIdFixedMap<T, C>
sourceimpl<T: Transport, const C: usize> TransferIdTracker<T> for TransferIdFixedMap<T, C>
impl<T: Transport, const C: usize> TransferIdTracker<T> for TransferIdFixedMap<T, C>
sourcefn next_transfer_id(
&mut self,
destination: T::NodeId
) -> Result<T::TransferId, OutOfMemoryError>
fn next_transfer_id(
&mut self,
destination: T::NodeId
) -> Result<T::TransferId, OutOfMemoryError>
Returns the next transfer ID for the provided node, and increments the stored ID
Auto Trait Implementations
impl<T, const C: usize> RefUnwindSafe for TransferIdFixedMap<T, C> where
<T as Transport>::NodeId: RefUnwindSafe,
<T as Transport>::TransferId: RefUnwindSafe,
impl<T, const C: usize> Send for TransferIdFixedMap<T, C> where
<T as Transport>::NodeId: Send,
<T as Transport>::TransferId: Send,
impl<T, const C: usize> Sync for TransferIdFixedMap<T, C> where
<T as Transport>::NodeId: Sync,
<T as Transport>::TransferId: Sync,
impl<T, const C: usize> Unpin for TransferIdFixedMap<T, C> where
<T as Transport>::NodeId: Unpin,
<T as Transport>::TransferId: Unpin,
impl<T, const C: usize> UnwindSafe for TransferIdFixedMap<T, C> where
<T as Transport>::NodeId: UnwindSafe,
<T as Transport>::TransferId: UnwindSafe,
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