pub enum Scalar {
Cluster(ClusterRef),
Map(Map<Self>),
Op(OpDef),
Range((Bound<Value>, Bound<Value>)),
Ref(Box<TCRef>),
Tuple(Tuple<Self>),
Value(Value),
}
Expand description
A scalar value, i.e. an immutable state always held in main memory and never split into blocks.
Variants§
Cluster(ClusterRef)
Map(Map<Self>)
Op(OpDef)
Range((Bound<Value>, Bound<Value>))
Ref(Box<TCRef>)
Tuple(Tuple<Self>)
Value(Value)
Implementations§
Trait Implementations§
source§impl AsType<(Bound<Value>, Bound<Value>)> for Scalar
impl AsType<(Bound<Value>, Bound<Value>)> for Scalar
source§impl AsType<Box<TCRef>> for Scalar
impl AsType<Box<TCRef>> for Scalar
source§impl AsType<ClusterRef> for Scalar
impl AsType<ClusterRef> for Scalar
source§fn as_type(&self) -> Option<&ClusterRef>
fn as_type(&self) -> Option<&ClusterRef>
Borrow this instance as an instance of
T
if possible.source§fn as_type_mut(&mut self) -> Option<&mut ClusterRef>
fn as_type_mut(&mut self) -> Option<&mut ClusterRef>
Borrow this instance mutably as an instance of
T
if possible.source§fn into_type(self) -> Option<ClusterRef>
fn into_type(self) -> Option<ClusterRef>
Convert this instance into an instance of
T
if possible.source§impl AsType<Map<Scalar>> for Scalar
impl AsType<Map<Scalar>> for Scalar
source§impl AsType<OpDef> for Scalar
impl AsType<OpDef> for Scalar
source§fn as_type_mut(&mut self) -> Option<&mut OpDef>
fn as_type_mut(&mut self) -> Option<&mut OpDef>
Borrow this instance mutably as an instance of
T
if possible.source§impl AsType<Tuple<Scalar>> for Scalar
impl AsType<Tuple<Scalar>> for Scalar
source§impl AsType<Value> for Scalar
impl AsType<Value> for Scalar
source§fn as_type_mut(&mut self) -> Option<&mut Value>
fn as_type_mut(&mut self) -> Option<&mut Value>
Borrow this instance mutably as an instance of
T
if possible.source§impl From<ClusterRef> for Scalar
impl From<ClusterRef> for Scalar
source§fn from(t: ClusterRef) -> Self
fn from(t: ClusterRef) -> Self
Converts to this type from the input type.
source§impl FromStream for Scalar
impl FromStream for Scalar
source§impl GetSize for Scalar
impl GetSize for Scalar
source§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
source§impl Instance for Scalar
impl Instance for Scalar
§type Class = ScalarType
type Class = ScalarType
The
Class
type of this instancesource§fn class(&self) -> ScalarType
fn class(&self) -> ScalarType
Returns the [
Class]
of this instance.source§impl<'en> IntoStream<'en> for Scalar
impl<'en> IntoStream<'en> for Scalar
source§impl PartialEq for Scalar
impl PartialEq for Scalar
source§impl<State> Refer<State> for Scalarwhere
State: StateInstance + Refer<State> + From<Scalar>,
State::Closure: From<(Map<State>, OpDef)> + TryCastFrom<State>,
Map<State>: TryFrom<State, Error = TCError>,
Value: TryFrom<State, Error = TCError> + TryCastFrom<State>,
bool: TryCastFrom<State>,
impl<State> Refer<State> for Scalarwhere
State: StateInstance + Refer<State> + From<Scalar>,
State::Closure: From<(Map<State>, OpDef)> + TryCastFrom<State>,
Map<State>: TryFrom<State, Error = TCError>,
Value: TryFrom<State, Error = TCError> + TryCastFrom<State>,
bool: TryCastFrom<State>,
source§fn dereference_self(self, path: &TCPathBuf) -> Self
fn dereference_self(self, path: &TCPathBuf) -> Self
Replace references to “$self” with the given relative path. Read more
source§fn is_conditional(&self) -> bool
fn is_conditional(&self) -> bool
Return
true
if this is a conditional reference (e.g. If
or Case
).source§fn is_inter_service_write(&self, cluster_path: &[PathSegment]) -> bool
fn is_inter_service_write(&self, cluster_path: &[PathSegment]) -> bool
Return
true
if this references a write operation to a cluster other than the path given.source§fn reference_self(self, path: &TCPathBuf) -> Self
fn reference_self(self, path: &TCPathBuf) -> Self
Replace the given relative path with “$self”. Read more
source§fn requires(&self, deps: &mut HashSet<Id>)
fn requires(&self, deps: &mut HashSet<Id>)
Add the dependency [
Id
]s of this reference to the given set.source§impl<State> Route<State> for Scalarwhere
State: StateInstance + Refer<State> + From<Scalar> + From<Tuple<Scalar>> + From<Map<Scalar>> + From<Value> + From<Tuple<Value>> + From<Number>,
Box<dyn ClosureInstance<State>>: TryCastFrom<State>,
Id: TryCastFrom<State>,
Map<State>: TryFrom<State, Error = TCError> + TryCastFrom<State>,
Number: TryCastFrom<State>,
TCString: TryCastFrom<State>,
Tuple<State>: TryCastFrom<State>,
Value: TryCastFrom<State>,
impl<State> Route<State> for Scalarwhere
State: StateInstance + Refer<State> + From<Scalar> + From<Tuple<Scalar>> + From<Map<Scalar>> + From<Value> + From<Tuple<Value>> + From<Number>,
Box<dyn ClosureInstance<State>>: TryCastFrom<State>,
Id: TryCastFrom<State>,
Map<State>: TryFrom<State, Error = TCError> + TryCastFrom<State>,
Number: TryCastFrom<State>,
TCString: TryCastFrom<State>,
Tuple<State>: TryCastFrom<State>,
Value: TryCastFrom<State>,
source§impl TryCastFrom<Scalar> for (Bound<Value>, Bound<Value>)
impl TryCastFrom<Scalar> for (Bound<Value>, Bound<Value>)
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<T: TryCastFrom<Scalar>> TryCastFrom<Scalar> for (T,)
impl<T: TryCastFrom<Scalar>> TryCastFrom<Scalar> for (T,)
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<T1: TryCastFrom<Scalar>, T2: TryCastFrom<Scalar>> TryCastFrom<Scalar> for (T1, T2)
impl<T1: TryCastFrom<Scalar>, T2: TryCastFrom<Scalar>> TryCastFrom<Scalar> for (T1, T2)
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<T1: TryCastFrom<Scalar>, T2: TryCastFrom<Scalar>, T3: TryCastFrom<Scalar>> TryCastFrom<Scalar> for (T1, T2, T3)
impl<T1: TryCastFrom<Scalar>, T2: TryCastFrom<Scalar>, T3: TryCastFrom<Scalar>> TryCastFrom<Scalar> for (T1, T2, T3)
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for After
impl TryCastFrom<Scalar> for After
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for Bytes
impl TryCastFrom<Scalar> for Bytes
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for Case
impl TryCastFrom<Scalar> for Case
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for Float
impl TryCastFrom<Scalar> for Float
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for Host
impl TryCastFrom<Scalar> for Host
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for Id
impl TryCastFrom<Scalar> for Id
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for IdRef
impl TryCastFrom<Scalar> for IdRef
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for IfRef
impl TryCastFrom<Scalar> for IfRef
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for Link
impl TryCastFrom<Scalar> for Link
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<T: Clone + TryCastFrom<Scalar>> TryCastFrom<Scalar> for Map<T>
impl<T: Clone + TryCastFrom<Scalar>> TryCastFrom<Scalar> for Map<T>
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for Number
impl TryCastFrom<Scalar> for Number
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for OpDef
impl TryCastFrom<Scalar> for OpDef
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for OpRef
impl TryCastFrom<Scalar> for OpRef
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<const N: usize, T> TryCastFrom<Scalar> for SmallVec<[T; N]>
impl<const N: usize, T> TryCastFrom<Scalar> for SmallVec<[T; N]>
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for Subject
impl TryCastFrom<Scalar> for Subject
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for TCPathBuf
impl TryCastFrom<Scalar> for TCPathBuf
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for TCRef
impl TryCastFrom<Scalar> for TCRef
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for TCString
impl TryCastFrom<Scalar> for TCString
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for Tuple<Scalar>
impl TryCastFrom<Scalar> for Tuple<Scalar>
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for Tuple<Value>
impl TryCastFrom<Scalar> for Tuple<Value>
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for Value
impl TryCastFrom<Scalar> for Value
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<T: TryCastFrom<Scalar>> TryCastFrom<Scalar> for Vec<T>
impl<T: TryCastFrom<Scalar>> TryCastFrom<Scalar> for Vec<T>
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for While
impl TryCastFrom<Scalar> for While
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for With
impl TryCastFrom<Scalar> for With
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for bool
impl TryCastFrom<Scalar> for bool
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for u64
impl TryCastFrom<Scalar> for u64
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for usize
impl TryCastFrom<Scalar> for usize
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.impl Eq for Scalar
impl StructuralPartialEq for Scalar
Auto Trait Implementations§
impl RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl UnwindSafe for Scalar
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
§impl<'en, T> FileLoad for T
impl<'en, T> FileLoad for T
§impl<'en, T> FileSave<'en> for T
impl<'en, T> FileSave<'en> for T
source§impl<F> Match for F
impl<F> Match for F
source§fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
Returns
true
if self
can be cast into the target type T
.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
source§fn can_cast_from(_: &F) -> bool
fn can_cast_from(_: &F) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
source§fn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if
self
can be cast into T
.source§fn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns
Some(T)
if self
can be cast into T
, otherwise None
.