pub enum Literal {
F64(f64),
F32(f32),
U32(u32),
I32(i32),
I64(i64),
Bool(bool),
AbstractInt(i64),
AbstractFloat(f64),
}
Variants§
F64(f64)
May not be NaN or infinity.
F32(f32)
May not be NaN or infinity.
U32(u32)
I32(i32)
I64(i64)
Bool(bool)
AbstractInt(i64)
AbstractFloat(f64)
Implementations§
Source§impl Literal
impl Literal
pub const fn new(value: u8, scalar: Scalar) -> Option<Self>
pub const fn zero(scalar: Scalar) -> Option<Self>
pub const fn one(scalar: Scalar) -> Option<Self>
pub const fn width(&self) -> Bytes
pub const fn scalar(&self) -> Scalar
pub const fn scalar_kind(&self) -> ScalarKind
pub const fn ty_inner(&self) -> TypeInner
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for Literal
impl<'arbitrary> Arbitrary<'arbitrary> for Literal
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§impl<'de> Deserialize<'de> for Literal
impl<'de> Deserialize<'de> for Literal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialOrd for Literal
impl PartialOrd for Literal
impl Copy for Literal
impl Eq for Literal
Auto Trait Implementations§
impl Freeze for Literal
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.