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 ConstDecl
impl Move for ConstDecl
impl RefUnwindSafe for ConstDecl
impl Send for ConstDecl
impl Sync for ConstDecl
impl Unpin for ConstDecl
impl UnsafeUnpin for ConstDecl
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