pub struct ConstNodeDecl<P: Phase = Raw> {
pub visibility: Visibility,
pub name: Spanned<DeclName>,
pub type_ann: TypeExpr<P>,
pub value: Expr<P>,
}Expand description
Const node declaration: const node name: Type = expr;
Fields§
§visibility: Visibility§name: Spanned<DeclName>§type_ann: TypeExpr<P>§value: Expr<P>Trait Implementations§
Source§impl<P: Clone + Phase> Clone for ConstNodeDecl<P>
impl<P: Clone + Phase> Clone for ConstNodeDecl<P>
Source§fn clone(&self) -> ConstNodeDecl<P>
fn clone(&self) -> ConstNodeDecl<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 ConstNodeDecl
impl FormatEquivalent for ConstNodeDecl
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<ConstNodeDecl> for ConstNodeDecl<Desugared>
impl From<ConstNodeDecl> for ConstNodeDecl<Desugared>
Source§fn from(c: ConstNodeDecl<Raw>) -> Self
fn from(c: ConstNodeDecl<Raw>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<P> Freeze for ConstNodeDecl<P>
impl<P> RefUnwindSafe for ConstNodeDecl<P>
impl<P> Send for ConstNodeDecl<P>
impl<P> Sync for ConstNodeDecl<P>
impl<P> Unpin for ConstNodeDecl<P>
impl<P> UnsafeUnpin for ConstNodeDecl<P>
impl<P> UnwindSafe for ConstNodeDecl<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