pub struct AssertDecl<P: Phase = Raw> {
pub visibility: Visibility,
pub name: Spanned<DeclName>,
pub body: AssertBody<P>,
}Expand description
Assert declaration: assert name = <expr>;
The body must evaluate to Bool. No type annotation (it’s always Bool).
Assert declarations are leaf nodes — they are evaluated after the entire graph.
Fields§
§visibility: Visibility§name: Spanned<DeclName>§body: AssertBody<P>Trait Implementations§
Source§impl<P: Clone + Phase> Clone for AssertDecl<P>
impl<P: Clone + Phase> Clone for AssertDecl<P>
Source§fn clone(&self) -> AssertDecl<P>
fn clone(&self) -> AssertDecl<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 AssertDecl
impl FormatEquivalent for AssertDecl
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<AssertDecl> for AssertDecl<Desugared>
impl From<AssertDecl> for AssertDecl<Desugared>
Source§fn from(a: AssertDecl<Raw>) -> Self
fn from(a: AssertDecl<Raw>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<P> Freeze for AssertDecl<P>
impl<P> RefUnwindSafe for AssertDecl<P>
impl<P> Send for AssertDecl<P>
impl<P> Sync for AssertDecl<P>
impl<P> Unpin for AssertDecl<P>
impl<P> UnsafeUnpin for AssertDecl<P>
impl<P> UnwindSafe for AssertDecl<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