pub enum AssertBody<P: Phase = Raw> {
Expr(Expr<P>),
Tolerance {
actual: Box<Expr<P>>,
expected: Box<Expr<P>>,
tolerance: Box<Expr<P>>,
is_relative: bool,
},
}Expand description
The body of an assert declaration.
Variants§
Expr(Expr<P>)
Plain boolean expression: assert name = expr;
Tolerance
Tolerance: assert name = actual ~= expected +/- tolerance;
Trait Implementations§
Source§impl<P: Clone + Phase> Clone for AssertBody<P>
impl<P: Clone + Phase> Clone for AssertBody<P>
Source§fn clone(&self) -> AssertBody<P>
fn clone(&self) -> AssertBody<P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl FormatEquivalent for AssertBody
impl FormatEquivalent for AssertBody
Source§fn format_equivalent(&self, other: &Self) -> bool
fn format_equivalent(&self, other: &Self) -> bool
Returns
true if self and other are equivalent up to formatting.Source§impl From<AssertBody> for AssertBody<Desugared>
impl From<AssertBody> for AssertBody<Desugared>
Source§fn from(b: AssertBody<Raw>) -> Self
fn from(b: AssertBody<Raw>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<P> Freeze for AssertBody<P>
impl<P> RefUnwindSafe for AssertBody<P>
impl<P> Send for AssertBody<P>
impl<P> Sync for AssertBody<P>
impl<P> Unpin for AssertBody<P>
impl<P> UnsafeUnpin for AssertBody<P>
impl<P> UnwindSafe for AssertBody<P>
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