pub enum Const {
Int {
lit: BigInt,
ty: Type,
},
Float {
lit: f64,
ty: Type,
},
Str {
id: StrId,
ty: Type,
},
StrLit(CString),
Bool(bool),
Ty(Type),
Mod(ModScopeId),
BasicVariant {
enuum: EnumId,
index: usize,
},
StructLit {
fields: Vec<Const>,
id: StructId,
},
Void,
}
Variants
Int
Float
Str
StrLit(CString)
A compile-time known string that comes from a string literal. This will be used in the future to convert to some user-defined type at compile-time.
Bool(bool)
Ty(Type)
Mod(ModScopeId)
BasicVariant
StructLit
Void
Implementations
Trait Implementations
impl StructuralPartialEq for Const
Auto Trait Implementations
impl RefUnwindSafe for Const
impl Send for Const
impl Sync for Const
impl Unpin for Const
impl UnwindSafe for Const
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more