pub enum TypedValue<T = DefaultTypeSet>where
T: TypeSet,{
Void,
MaybeSignedInt(<T as TypeSet>::Integer),
Int(<T as TypeSet>::Integer),
SignedInt(<T as TypeSet>::SignedInteger),
Float(<T as TypeSet>::Float),
Bool(bool),
String(<T as TypeSet>::String),
Iter(<T as TypeSet>::Iterator),
Struct(SomniStruct<T>),
Ref(Reference),
}Expand description
Represents any value in the expression language.
Variants§
Void
Represents no value.
MaybeSignedInt(<T as TypeSet>::Integer)
Represents an integer that may be signed or unsigned.
MaybeSignedInt can compare equal with Int and SignedInt.
Int(<T as TypeSet>::Integer)
Represents an unsigned integer.
SignedInt(<T as TypeSet>::SignedInteger)
Represents a signed integer.
Float(<T as TypeSet>::Float)
Represents a floating-point.
Bool(bool)
Represents a boolean.
String(<T as TypeSet>::String)
Represents a string.
Iter(<T as TypeSet>::Iterator)
Represents an iterator.
Struct(SomniStruct<T>)
Represents a struct value: a named aggregate of typed fields.
Ref(Reference)
Represents a reference to a place (a variable, or a field within one).
Implementations§
Trait Implementations§
Source§impl<T> Clone for TypedValue<T>where
T: TypeSet,
impl<T> Clone for TypedValue<T>where
T: TypeSet,
Source§fn clone(&self) -> TypedValue<T>
fn clone(&self) -> TypedValue<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> Debug for TypedValue<T>
impl<T> Debug for TypedValue<T>
Source§impl IntoValue for TypedValue<TemplateTypes>
impl IntoValue for TypedValue<TemplateTypes>
Source§fn into_value(self) -> TypedValue<TemplateTypes>
fn into_value(self) -> TypedValue<TemplateTypes>
Converts
self into a Somni value.Source§impl<T> LoadOwned<T> for TypedValue<T>where
T: TypeSet,
impl<T> LoadOwned<T> for TypedValue<T>where
T: TypeSet,
Source§type Output = TypedValue<T>
type Output = TypedValue<T>
The type of the result.
Source§fn load_owned(_ctx: &T, typed: &TypedValue<T>) -> Option<TypedValue<T>>
fn load_owned(_ctx: &T, typed: &TypedValue<T>) -> Option<TypedValue<T>>
Loads an owned value from the given type context.
Source§impl<T> LoadStore<T> for TypedValue<T>where
T: TypeSet,
impl<T> LoadStore<T> for TypedValue<T>where
T: TypeSet,
Source§type Output<'s> = TypedValue<T>
type Output<'s> = TypedValue<T>
The type of the result.
Source§fn load(ctx: &T, typed: &TypedValue<T>) -> Option<TypedValue<T>>
fn load(ctx: &T, typed: &TypedValue<T>) -> Option<TypedValue<T>>
Loads a borrowed value from the given type context.
Source§fn store(&self, _ctx: &mut T) -> TypedValue<T>
fn store(&self, _ctx: &mut T) -> TypedValue<T>
Stores a Rust value into a TypedValue using the given type context.
Auto Trait Implementations§
impl<T = DefaultTypeSet> !Send for TypedValue<T>
impl<T = DefaultTypeSet> !Sync for TypedValue<T>
impl<T> Freeze for TypedValue<T>
impl<T> RefUnwindSafe for TypedValue<T>where
<T as TypeSet>::Integer: RefUnwindSafe,
<T as TypeSet>::SignedInteger: RefUnwindSafe,
<T as TypeSet>::Float: RefUnwindSafe,
<T as TypeSet>::String: RefUnwindSafe,
<T as TypeSet>::Iterator: RefUnwindSafe,
SomniStruct<T>: RefUnwindSafe,
impl<T> Unpin for TypedValue<T>
impl<T> UnsafeUnpin for TypedValue<T>where
<T as TypeSet>::Integer: UnsafeUnpin,
<T as TypeSet>::SignedInteger: UnsafeUnpin,
<T as TypeSet>::Float: UnsafeUnpin,
<T as TypeSet>::String: UnsafeUnpin,
<T as TypeSet>::Iterator: UnsafeUnpin,
SomniStruct<T>: UnsafeUnpin,
impl<T> UnwindSafe for TypedValue<T>where
<T as TypeSet>::Integer: UnwindSafe,
<T as TypeSet>::SignedInteger: UnwindSafe,
<T as TypeSet>::Float: UnwindSafe,
<T as TypeSet>::String: UnwindSafe,
<T as TypeSet>::Iterator: UnwindSafe,
SomniStruct<T>: UnwindSafe,
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