pub enum CoreValue {
Null,
Bool(Boolean),
Integer(Integer),
TypedInteger(TypedInteger),
Decimal(Decimal),
TypedDecimal(TypedDecimal),
Text(Text),
Endpoint(Endpoint),
Array(Array),
Object(Object),
Tuple(Tuple),
}Variants§
Null
Bool(Boolean)
Integer(Integer)
TypedInteger(TypedInteger)
Decimal(Decimal)
TypedDecimal(TypedDecimal)
Text(Text)
Endpoint(Endpoint)
Array(Array)
Object(Object)
Tuple(Tuple)
Implementations§
Source§impl CoreValue
impl CoreValue
pub fn new<T>(value: T) -> CoreValue
pub fn get_default_type(&self) -> CoreValueType
pub fn cast_to(&self, target_type: CoreValueType) -> Option<CoreValue>
pub fn cast_to_text(&self) -> Text
pub fn cast_to_bool(&self) -> Option<Boolean>
pub fn cast_to_float(&self) -> Option<TypedDecimal>
pub fn cast_to_integer(&self) -> Option<TypedInteger>
pub fn cast_to_endpoint(&self) -> Option<Endpoint>
pub fn cast_to_array(&self) -> Option<Array>
pub fn cast_to_object(&self) -> Option<Object>
pub fn cast_to_tuple(&self) -> Option<Tuple>
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<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.
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 !UnwindSafe for CoreValue
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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