pub enum CoreValue {
}Variants§
Null
Boolean(Boolean)
Integer(Integer)
TypedInteger(TypedInteger)
Decimal(Decimal)
TypedDecimal(TypedDecimal)
Text(Text)
Endpoint(Endpoint)
List(List)
Map(Map)
Type(Type)
Callable(Callable)
Range(Range)
Implementations§
Source§impl CoreValue
impl CoreValue
pub fn new<T>(value: T) -> CoreValue
Sourcepub fn is_collection_value(&self) -> bool
pub fn is_collection_value(&self) -> bool
Check if the CoreValue is a combined value type (List, Map) that contains inner ValueContainers.
Sourcepub fn default_type_definition(&self) -> TypeDefinition
pub fn default_type_definition(&self) -> TypeDefinition
Get the default type of the CoreValue type definition. This method uses the CoreLibPointerId to retrieve the corresponding type reference from the core library. For example, a CoreValue::TypedInteger(i32) will return the type ref integer/i32
pub fn cast_to_type(&self) -> Option<&Type>
pub fn cast_to_text(&self) -> Text
pub fn cast_to_bool(&self) -> Option<Boolean>
pub fn cast_to_decimal(&self) -> Option<Decimal>
pub fn cast_to_typed_decimal( &self, variant: DecimalTypeVariant, ) -> Option<TypedDecimal>
pub fn _cast_to_integer_internal(&self) -> Option<TypedInteger>
pub fn cast_to_integer(&self) -> Option<Integer>
pub fn cast_to_typed_integer( &self, variant: IntegerTypeVariant, ) -> Option<TypedInteger>
pub fn cast_to_endpoint(&self) -> Option<Endpoint>
pub fn cast_to_list(&self) -> Option<List>
pub fn cast_to_map(&self) -> Option<Map>
Trait Implementations§
Source§impl AddAssign for CoreValue
impl AddAssign for CoreValue
Source§fn add_assign(&mut self, rhs: CoreValue)
fn add_assign(&mut self, rhs: CoreValue)
Performs the
+= operation. Read moreSource§impl From<&CoreValue> for CoreLibPointerId
impl From<&CoreValue> for CoreLibPointerId
Source§impl From<TypedDecimal> for CoreValue
impl From<TypedDecimal> for CoreValue
Source§fn from(value: TypedDecimal) -> Self
fn from(value: TypedDecimal) -> Self
Converts to this type from the input type.
Source§impl From<TypedInteger> for CoreValue
impl From<TypedInteger> for CoreValue
Source§fn from(value: TypedInteger) -> Self
fn from(value: TypedInteger) -> Self
Converts to this type from the input type.
Source§impl<T> FromIterator<T> for CoreValuewhere
T: Into<ValueContainer>,
impl<T> FromIterator<T> for CoreValuewhere
T: Into<ValueContainer>,
Source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl StructuralEq for CoreValue
impl StructuralEq for CoreValue
Source§fn structural_eq(&self, other: &Self) -> bool
fn structural_eq(&self, other: &Self) -> bool
Check if two values are equal, ignoring the type.
Source§impl ValueEq for CoreValue
Value equality corresponds to partial equality for all values,
except for decimals, where partial equality is also given for NaN values and +0.0 and -0.0.
Therefore, we ValueEq is used instead for decimals
impl ValueEq for CoreValue
Value equality corresponds to partial equality for all values, except for decimals, where partial equality is also given for NaN values and +0.0 and -0.0. Therefore, we ValueEq is used instead for decimals
impl Eq for CoreValue
impl StructuralPartialEq for CoreValue
Auto Trait Implementations§
impl Freeze for CoreValue
impl !RefUnwindSafe for CoreValue
impl !Send for CoreValue
impl !Sync for CoreValue
impl Unpin for CoreValue
impl UnsafeUnpin for CoreValue
impl !UnwindSafe for CoreValue
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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