pub enum LiteralExpression {
Bool(bool),
AbstractInt(i64),
AbstractFloat(f64),
I32(i32),
U32(u32),
F32(f32),
F16(f32),
}
Variants§
Implementations§
Source§impl LiteralExpression
impl LiteralExpression
Sourcepub const fn is_bool(&self) -> bool
pub const fn is_bool(&self) -> bool
Returns true
if this value is of type Bool
. Returns false
otherwise
Sourcepub const fn is_abstract_int(&self) -> bool
pub const fn is_abstract_int(&self) -> bool
Returns true
if this value is of type AbstractInt
. Returns false
otherwise
Sourcepub const fn is_abstract_float(&self) -> bool
pub const fn is_abstract_float(&self) -> bool
Returns true
if this value is of type AbstractFloat
. Returns false
otherwise
Sourcepub const fn is_i_32(&self) -> bool
pub const fn is_i_32(&self) -> bool
Returns true
if this value is of type I32
. Returns false
otherwise
Sourcepub const fn is_u_32(&self) -> bool
pub const fn is_u_32(&self) -> bool
Returns true
if this value is of type U32
. Returns false
otherwise
Source§impl LiteralExpression
impl LiteralExpression
Sourcepub fn unwrap_bool(self) -> bool
pub fn unwrap_bool(self) -> bool
Unwraps this value to the LiteralExpression::Bool
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_abstract_int(self) -> i64
pub fn unwrap_abstract_int(self) -> i64
Unwraps this value to the LiteralExpression::AbstractInt
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_abstract_float(self) -> f64
pub fn unwrap_abstract_float(self) -> f64
Unwraps this value to the LiteralExpression::AbstractFloat
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_i_32(self) -> i32
pub fn unwrap_i_32(self) -> i32
Unwraps this value to the LiteralExpression::I32
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_u_32(self) -> u32
pub fn unwrap_u_32(self) -> u32
Unwraps this value to the LiteralExpression::U32
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_f_32(self) -> f32
pub fn unwrap_f_32(self) -> f32
Unwraps this value to the LiteralExpression::F32
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_f_16(self) -> f32
pub fn unwrap_f_16(self) -> f32
Unwraps this value to the LiteralExpression::F16
variant.
Panics if this value is of any other type.
Trait Implementations§
Source§impl Clone for LiteralExpression
impl Clone for LiteralExpression
Source§fn clone(&self) -> LiteralExpression
fn clone(&self) -> LiteralExpression
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LiteralExpression
impl Debug for LiteralExpression
Source§impl Display for LiteralExpression
impl Display for LiteralExpression
Source§impl From<LiteralExpression> for Expression
impl From<LiteralExpression> for Expression
Source§fn from(value: LiteralExpression) -> Self
fn from(value: LiteralExpression) -> Self
Source§impl From<bool> for LiteralExpression
impl From<bool> for LiteralExpression
Source§impl From<f32> for LiteralExpression
impl From<f32> for LiteralExpression
Source§impl From<f64> for LiteralExpression
impl From<f64> for LiteralExpression
Source§impl From<i32> for LiteralExpression
impl From<i32> for LiteralExpression
Source§impl From<i64> for LiteralExpression
impl From<i64> for LiteralExpression
Source§impl From<u32> for LiteralExpression
impl From<u32> for LiteralExpression
Source§impl PartialEq for LiteralExpression
impl PartialEq for LiteralExpression
impl Copy for LiteralExpression
impl StructuralPartialEq for LiteralExpression
Auto Trait Implementations§
impl Freeze for LiteralExpression
impl RefUnwindSafe for LiteralExpression
impl Send for LiteralExpression
impl Sync for LiteralExpression
impl Unpin for LiteralExpression
impl UnwindSafe for LiteralExpression
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more