pub struct ConstDecl {
pub name: String,
pub pos: Pos,
pub params: Vec<TypeParam>,
pub ty: Option<Type>,
pub value: Value,
}Expand description
const name<Params>: Type = value;, in which the parameters and the type may be left out together.
Fields§
§name: StringThe name of the const.
pos: PosThe position of the name.
params: Vec<TypeParam>The type parameters, which are empty if there are none.
ty: Option<Type>The declared type, or None if it is to be inferred from the value.
value: ValueThe value of the const.
Trait Implementations§
impl Eq for ConstDecl
impl StructuralPartialEq for ConstDecl
Auto Trait Implementations§
impl Forget for ConstDecl
impl Freeze for ConstDeclwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<TypeParam>: Freeze,
PhantomData<Type>: Freeze,
*const Type is !null: Freeze,
PhantomData<Field>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<Member>: Freeze,
PhantomData<Argument>: Freeze,
impl Move for ConstDecl
impl RefUnwindSafe for ConstDecl
impl Send for ConstDecl
impl Sync for ConstDecl
impl Unpin for ConstDecl
impl UnsafeUnpin for ConstDeclwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<TypeParam>: UnsafeUnpin,
PhantomData<Type>: UnsafeUnpin,
*const Type is !null: UnsafeUnpin,
PhantomData<Field>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<Member>: UnsafeUnpin,
PhantomData<Argument>: UnsafeUnpin,
impl UnwindSafe for ConstDecl
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