Enum arithmetic_typing::UnknownLen
source · #[non_exhaustive]pub enum UnknownLen {
Dynamic,
Var(LengthVar),
}
Expand description
Unknown / variable length, e.g., of a tuple.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Dynamic
Length that can vary at runtime, similar to lengths of slices in Rust.
Var(LengthVar)
Length variable.
Implementations§
source§impl UnknownLen
impl UnknownLen
sourcepub const fn param(index: usize) -> Self
pub const fn param(index: usize) -> Self
Creates a bounded type variable that can be used to build functions.
Trait Implementations§
source§impl Add<usize> for UnknownLen
impl Add<usize> for UnknownLen
source§impl Clone for UnknownLen
impl Clone for UnknownLen
source§fn clone(&self) -> UnknownLen
fn clone(&self) -> UnknownLen
Returns a copy 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 Debug for UnknownLen
impl Debug for UnknownLen
source§impl Display for UnknownLen
impl Display for UnknownLen
source§impl From<UnknownLen> for TupleLen
impl From<UnknownLen> for TupleLen
source§fn from(var: UnknownLen) -> Self
fn from(var: UnknownLen) -> Self
Converts to this type from the input type.
source§impl PartialEq for UnknownLen
impl PartialEq for UnknownLen
source§fn eq(&self, other: &UnknownLen) -> bool
fn eq(&self, other: &UnknownLen) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for UnknownLen
impl Eq for UnknownLen
impl StructuralPartialEq for UnknownLen
Auto Trait Implementations§
impl Freeze for UnknownLen
impl RefUnwindSafe for UnknownLen
impl Send for UnknownLen
impl Sync for UnknownLen
impl Unpin for UnknownLen
impl UnwindSafe for UnknownLen
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more