#[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 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 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
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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
Compare self to
key and return true if they are equal.