pub enum Value {
Show 18 variants
Input(Type, Identifier),
Address(String, Span),
Boolean(bool, Span),
Struct(Identifier, IndexMap<Symbol, Value>),
Field(String, Span),
Group(String, Span),
I8(i8, Span),
I16(i16, Span),
I32(i32, Span),
I64(i64, Span),
I128(i128, Span),
U8(u8, Span),
U16(u16, Span),
U32(u32, Span),
U64(u64, Span),
U128(u128, Span),
Scalar(String, Span),
String(String, Span),
}
Variants§
Input(Type, Identifier)
Address(String, Span)
Boolean(bool, Span)
Struct(Identifier, IndexMap<Symbol, Value>)
Field(String, Span)
Group(String, Span)
I8(i8, Span)
I16(i16, Span)
I32(i32, Span)
I64(i64, Span)
I128(i128, Span)
U8(u8, Span)
U16(u16, Span)
U32(u32, Span)
U64(u64, Span)
U128(u128, Span)
Scalar(String, Span)
String(String, Span)
Implementations§
Source§impl Value
impl Value
pub(crate) fn abs(self, span: Span) -> Result<Self>
pub(crate) fn abs_wrapped(self, span: Span) -> Result<Self>
pub(crate) fn neg(self, span: Span) -> Result<Self>
pub(crate) fn not(self, span: Span) -> Result<Self>
pub(crate) fn add(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn add_wrapped(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn bitand(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn div(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn div_wrapped(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn eq(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn ge(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn gt(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn le(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn lt(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn mul(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn mul_wrapped(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn bitor(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn pow(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn pow_wrapped(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn shl(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn shl_wrapped(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn shr(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn shr_wrapped(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn sub(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn sub_wrapped(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn xor(self, other: Self, span: Span) -> Result<Self>
pub(crate) fn is_supported_const_fold_type(&self) -> bool
Trait Implementations§
impl Eq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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