pub enum Literal {
F64(f64),
F32(f32),
U32(u32),
I32(i32),
Bool(bool),
}
Variants§
Implementations§
source§impl Literal
impl Literal
pub const fn new(value: u8, kind: ScalarKind, width: Bytes) -> Option<Self>
pub const fn zero(kind: ScalarKind, width: Bytes) -> Option<Self>
pub const fn one(kind: ScalarKind, width: Bytes) -> Option<Self>
pub const fn width(&self) -> Bytes
pub const fn scalar_kind(&self) -> ScalarKind
pub const fn ty_inner(&self) -> TypeInner
Trait Implementations§
source§impl PartialEq for Literal
impl PartialEq for Literal
source§impl PartialOrd for Literal
impl PartialOrd for Literal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Literal
impl Eq for Literal
Auto Trait Implementations§
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin 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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.