#[non_exhaustive]pub enum Literal {
Int {
limbs: Vec<u64>,
negative: bool,
},
Ones,
SMin,
SMax,
LowMask(WExpr),
Bit(WExpr),
Width(WExpr),
Float {
value: FloatLit,
eb: WExpr,
},
}Expand description
A literal in a pattern, template or guard. Its width comes from the node’s sort.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Int
An unsigned magnitude (little-endian limbs), optionally negated.
Ones
ones
SMin
smin_lit: only the top bit set.
SMax
smax_lit: every bit but the top set.
LowMask(WExpr)
lowmask(N): the low N bits set.
Bit(WExpr)
bit(K): only bit K set.
Width(WExpr)
A width expression used as a value (for example W - 1).
Float
A floating-point constant of the format with exponent width eb (and the literal’s
width), for example fp.one<E, S>.
Trait Implementations§
impl Eq for Literal
impl StructuralPartialEq for Literal
Auto Trait Implementations§
impl Forget for Literal
impl Freeze for Literal
impl Move for Literal
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnsafeUnpin for Literal
impl UnwindSafe for Literal
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