Enum arithmetic_typing::defs::Assertions
source · #[non_exhaustive]pub enum Assertions {
Assert,
AssertEq,
AssertFails,
}
Expand description
Definitions for assert
and assert_eq
functions.
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.
Assert
Type of the assert
function.
AssertEq
Type of the assert_eq
function.
AssertFails
Type of the assert_fails
function.
Implementations§
source§impl Assertions
impl Assertions
sourcepub fn iter<Prim: WithBoolean>() -> impl Iterator<Item = (&'static str, Type<Prim>)>
pub fn iter<Prim: WithBoolean>() -> impl Iterator<Item = (&'static str, Type<Prim>)>
Returns an iterator over all type definitions in Assertions
.
sourcepub fn assert_close<T: PrimitiveType>(value: T) -> Function<T>
pub fn assert_close<T: PrimitiveType>(value: T) -> Function<T>
Returns the type of the assert_close
function from the eval crate.
This function is not included into Self::iter()
because in the general case
we don’t know the type of arguments it accepts.
Trait Implementations§
source§impl Clone for Assertions
impl Clone for Assertions
source§fn clone(&self) -> Assertions
fn clone(&self) -> Assertions
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 Assertions
impl Debug for Assertions
source§impl<Prim: WithBoolean> From<Assertions> for Type<Prim>
impl<Prim: WithBoolean> From<Assertions> for Type<Prim>
source§fn from(value: Assertions) -> Self
fn from(value: Assertions) -> Self
Converts to this type from the input type.
source§impl Hash for Assertions
impl Hash for Assertions
source§impl PartialEq for Assertions
impl PartialEq for Assertions
source§fn eq(&self, other: &Assertions) -> bool
fn eq(&self, other: &Assertions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for Assertions
impl Eq for Assertions
impl StructuralPartialEq for Assertions
Auto Trait Implementations§
impl Freeze for Assertions
impl RefUnwindSafe for Assertions
impl Send for Assertions
impl Sync for Assertions
impl Unpin for Assertions
impl UnwindSafe for Assertions
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