pub struct Assert {
pub abs_tol: Scalar,
pub rel_tol: Scalar,
pub fd_tol: Scalar,
}Expand description
Specifies tolerances used by AssertEq functionalities.
Fields§
§abs_tol: Scalar§rel_tol: Scalar§fd_tol: ScalarImplementations§
Source§impl Assert
impl Assert
Sourcepub fn eq<T, Rhs>(a: T, b: Rhs) -> Result<(), AssertionError>where
T: AssertEq<Rhs>,
pub fn eq<T, Rhs>(a: T, b: Rhs) -> Result<(), AssertionError>where
T: AssertEq<Rhs>,
Asserts exact equality.
Sourcepub fn eq_within_tols<T, Rhs>(&self, a: T, b: Rhs) -> Result<(), AssertionError>where
T: AssertEq<Rhs>,
pub fn eq_within_tols<T, Rhs>(&self, a: T, b: Rhs) -> Result<(), AssertionError>where
T: AssertEq<Rhs>,
Asserts equality within self.abs_tol and self.rel_tol.
Sourcepub fn eq_within_fd_tol<T, Rhs>(
&self,
a: T,
b: Rhs,
) -> Result<(), AssertionError>where
T: AssertFd<Rhs>,
pub fn eq_within_fd_tol<T, Rhs>(
&self,
a: T,
b: Rhs,
) -> Result<(), AssertionError>where
T: AssertFd<Rhs>,
Asserts finite-difference equality within self.fd_tol.
Sourcepub fn zero_within_tols<T>(&self, a: &T) -> Result<(), AssertionError>
pub fn zero_within_tols<T>(&self, a: &T) -> Result<(), AssertionError>
Asserts equality with zero within self.abs_tol and self.rel_tol.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Assert
impl RefUnwindSafe for Assert
impl Send for Assert
impl Sync for Assert
impl Unpin for Assert
impl UnsafeUnpin for Assert
impl UnwindSafe for Assert
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