pub struct StaticExactCap<const SIZE: usize>;Expand description
A marker for a static exact size constraint, where MIN == MAX.
§Type Parameters
SIZE: The size of both the inclusive minimum and maximum capacity constraints.
Implementations§
Source§impl<const SIZE: usize> StaticExactCap<SIZE>
impl<const SIZE: usize> StaticExactCap<SIZE>
Sourcepub const RANGE: RangeInclusive<usize>
pub const RANGE: RangeInclusive<usize>
The equivalent range.
Trait Implementations§
Source§impl<const SIZE: usize> Capacity for StaticExactCap<SIZE>
impl<const SIZE: usize> Capacity for StaticExactCap<SIZE>
Source§type CompatError = CompatError<<StaticExactCap<SIZE> as Capacity>::Min, <StaticExactCap<SIZE> as Capacity>::Max>
type CompatError = CompatError<<StaticExactCap<SIZE> as Capacity>::Min, <StaticExactCap<SIZE> as Capacity>::Max>
The error type returned if an iterator is not compatible with the
capacity constraints.
Source§type FitError = FitError<<StaticExactCap<SIZE> as Capacity>::Min, <StaticExactCap<SIZE> as Capacity>::Max>
type FitError = FitError<<StaticExactCap<SIZE> as Capacity>::Min, <StaticExactCap<SIZE> as Capacity>::Max>
The error type returned if an iterator is not guaranteed to fit within
the capacity constraints.
Source§type Min = StaticMinCap<SIZE>
type Min = StaticMinCap<SIZE>
The type representing the minimum capacity bound.
Source§type Max = StaticMaxCap<SIZE>
type Max = StaticMaxCap<SIZE>
The type representing the maximum capacity bound.
Source§fn contains_size(&self, size: usize) -> bool
fn contains_size(&self, size: usize) -> bool
Returns true if the given size is within the capacity constraints.
Source§fn check_compatibility<I>(&self, iter: &I) -> Result<(), Self::CompatError>
fn check_compatibility<I>(&self, iter: &I) -> Result<(), Self::CompatError>
Checks if
iter is compatible with this capacity constraint. Read moreSource§impl<const SIZE: usize> Clone for StaticExactCap<SIZE>
impl<const SIZE: usize> Clone for StaticExactCap<SIZE>
Source§fn clone(&self) -> StaticExactCap<SIZE>
fn clone(&self) -> StaticExactCap<SIZE>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const SIZE: usize> Debug for StaticExactCap<SIZE>
impl<const SIZE: usize> Debug for StaticExactCap<SIZE>
Source§impl<const SIZE: usize> From<StaticExactCap<SIZE>> for ExactCapVal
impl<const SIZE: usize> From<StaticExactCap<SIZE>> for ExactCapVal
Source§fn from(_value: StaticExactCap<SIZE>) -> Self
fn from(_value: StaticExactCap<SIZE>) -> Self
Converts to this type from the input type.
Source§impl<const SIZE: usize> From<StaticExactCap<SIZE>> for MinMaxCapVal
impl<const SIZE: usize> From<StaticExactCap<SIZE>> for MinMaxCapVal
Source§fn from(_value: StaticExactCap<SIZE>) -> Self
fn from(_value: StaticExactCap<SIZE>) -> Self
Converts to this type from the input type.
Source§impl<const SIZE: usize> From<StaticExactCap<SIZE>> for RangeInclusive<usize>
impl<const SIZE: usize> From<StaticExactCap<SIZE>> for RangeInclusive<usize>
Source§fn from(_value: StaticExactCap<SIZE>) -> Self
fn from(_value: StaticExactCap<SIZE>) -> Self
Converts to this type from the input type.
Source§impl<const SIZE: usize> PartialEq for StaticExactCap<SIZE>
impl<const SIZE: usize> PartialEq for StaticExactCap<SIZE>
Source§impl<const SIZE: usize> RangeBounds<usize> for StaticExactCap<SIZE>
impl<const SIZE: usize> RangeBounds<usize> for StaticExactCap<SIZE>
Source§impl<const SIZE: usize> StaticCap for StaticExactCap<SIZE>
impl<const SIZE: usize> StaticCap for StaticExactCap<SIZE>
impl<const SIZE: usize> Copy for StaticExactCap<SIZE>
impl<const SIZE: usize> Eq for StaticExactCap<SIZE>
impl<const SIZE: usize> StructuralPartialEq for StaticExactCap<SIZE>
Auto Trait Implementations§
impl<const SIZE: usize> Freeze for StaticExactCap<SIZE>
impl<const SIZE: usize> RefUnwindSafe for StaticExactCap<SIZE>
impl<const SIZE: usize> Send for StaticExactCap<SIZE>
impl<const SIZE: usize> Sync for StaticExactCap<SIZE>
impl<const SIZE: usize> Unpin for StaticExactCap<SIZE>
impl<const SIZE: usize> UnwindSafe for StaticExactCap<SIZE>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> IntoOption for T
impl<T> IntoOption for T
§impl<T> IntoResult for T
impl<T> IntoResult for T
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.