pub struct Capacity(/* private fields */);Expand description
Maximum live slot count in one route table.
Implementations§
Source§impl Capacity
impl Capacity
Sourcepub fn try_nonzero(count: NonZero<u32>) -> Result<NonZeroU32<1, { _ }>, Invalid>
pub fn try_nonzero(count: NonZero<u32>) -> Result<NonZeroU32<1, { _ }>, Invalid>
Admits a nonempty table count while retaining its lower bound.
pub const fn count(self) -> Count
pub const fn contains(self, index: SlotIndex) -> bool
Sourcepub const fn next(self, index: SlotIndex) -> Option<SlotIndex>
pub const fn next(self, index: SlotIndex) -> Option<SlotIndex>
The following slot when it remains inside this table.
pub const fn excludes(self, index: SlotIndex) -> Option<Excluded>
pub fn slot(self, index: usize) -> Result<SlotIndex, Slot>
Trait Implementations§
impl Copy for Capacity
impl Eq for Capacity
Source§impl From<NonZeroU32<1, { route::SLOT_MASK as u32 + 1 }>> for Capacity
impl From<NonZeroU32<1, { route::SLOT_MASK as u32 + 1 }>> for Capacity
Source§fn from(count: NonZeroU32<1, { _ }>) -> Self
fn from(count: NonZeroU32<1, { _ }>) -> Self
Converts to this type from the input type.
Source§impl IntoIterator for Capacity
impl IntoIterator for Capacity
impl StructuralPartialEq for Capacity
Auto Trait Implementations§
impl Freeze for Capacity
impl RefUnwindSafe for Capacity
impl Send for Capacity
impl Sync for Capacity
impl Unpin for Capacity
impl UnsafeUnpin for Capacity
impl UnwindSafe for Capacity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more