pub enum State {
Collection(Collection),
Chain(Chain<CollectionBase>),
Closure(Closure),
Map(Map<Self>),
Object(Object),
Scalar(Scalar),
Tuple(Tuple<Self>),
}
Expand description
An addressable state with a discrete value per-transaction.
Variants§
Collection(Collection)
Chain(Chain<CollectionBase>)
Closure(Closure)
Map(Map<Self>)
Object(Object)
Scalar(Scalar)
Tuple(Tuple<Self>)
Implementations§
Trait Implementations§
source§impl<T1, T2, T3> CastFrom<(T1, T2, T3)> for State
impl<T1, T2, T3> CastFrom<(T1, T2, T3)> for State
source§fn cast_from(value: (T1, T2, T3)) -> Self
fn cast_from(value: (T1, T2, T3)) -> Self
Cast an instance of
T
into an instance of Self
.source§impl<T1, T2, T3, T4> CastFrom<(T1, T2, T3, T4)> for State
impl<T1, T2, T3, T4> CastFrom<(T1, T2, T3, T4)> for State
source§fn cast_from(value: (T1, T2, T3, T4)) -> Self
fn cast_from(value: (T1, T2, T3, T4)) -> Self
Cast an instance of
T
into an instance of Self
.source§impl ClosureInstance<State> for Closure
impl ClosureInstance<State> for Closure
source§impl From<BlockChain<State, CollectionBase<Txn<State>, CacheBlock>>> for State
impl From<BlockChain<State, CollectionBase<Txn<State>, CacheBlock>>> for State
source§fn from(chain: BlockChain<CollectionBase>) -> Self
fn from(chain: BlockChain<CollectionBase>) -> Self
Converts to this type from the input type.
source§impl From<Chain<State, CollectionBase<Txn<State>, CacheBlock>>> for State
impl From<Chain<State, CollectionBase<Txn<State>, CacheBlock>>> for State
source§fn from(chain: Chain<CollectionBase>) -> Self
fn from(chain: Chain<CollectionBase>) -> Self
Converts to this type from the input type.
source§impl From<Collection<Txn<State>, CacheBlock>> for State
impl From<Collection<Txn<State>, CacheBlock>> for State
source§fn from(collection: Collection) -> Self
fn from(collection: Collection) -> Self
Converts to this type from the input type.
source§impl From<CollectionBase<Txn<State>, CacheBlock>> for State
impl From<CollectionBase<Txn<State>, CacheBlock>> for State
source§fn from(collection: CollectionBase) -> Self
fn from(collection: CollectionBase) -> Self
Converts to this type from the input type.
source§impl From<InstanceClass> for State
impl From<InstanceClass> for State
source§fn from(class: InstanceClass) -> Self
fn from(class: InstanceClass) -> Self
Converts to this type from the input type.
source§impl From<Map<InstanceClass>> for State
impl From<Map<InstanceClass>> for State
source§fn from(map: Map<InstanceClass>) -> Self
fn from(map: Map<InstanceClass>) -> Self
Converts to this type from the input type.
source§impl FromStream for State
impl FromStream for State
source§impl<'a> Handler<'a, State> for Closure
impl<'a> Handler<'a, State> for Closure
fn get<'b>(self: Box<Self>) -> Option<GetHandler<'a, 'b, Txn, State>>where
'b: 'a,
fn put<'b>(self: Box<Self>) -> Option<PutHandler<'a, 'b, Txn, State>>where
'b: 'a,
fn post<'b>(self: Box<Self>) -> Option<PostHandler<'a, 'b, Txn, State>>where
'b: 'a,
fn delete<'b>(self: Box<Self>) -> Option<DeleteHandler<'a, 'b, Txn>>where
'b: 'a,
source§impl<'en> IntoView<'en, CacheBlock> for State
impl<'en> IntoView<'en, CacheBlock> for State
§type Txn = Txn<State>
type Txn = Txn<State>
The type of
Transaction
which this state supportssource§impl Refer<State> for State
impl Refer<State> for 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 Route<State> for InstanceClass
impl Route<State> for InstanceClass
source§impl Route<State> for ObjectType
impl Route<State> for ObjectType
source§impl StateInstance for State
impl StateInstance for State
source§impl<T: TryCastFrom<State>> TryCastFrom<State> for (T,)
impl<T: TryCastFrom<State>> TryCastFrom<State> for (T,)
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<T1: TryCastFrom<State>, T2: TryCastFrom<State>> TryCastFrom<State> for (T1, T2)
impl<T1: TryCastFrom<State>, T2: TryCastFrom<State>> TryCastFrom<State> for (T1, T2)
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<T1: TryCastFrom<State>, T2: TryCastFrom<State>, T3: TryCastFrom<State>> TryCastFrom<State> for (T1, T2, T3)
impl<T1: TryCastFrom<State>, T2: TryCastFrom<State>, T3: TryCastFrom<State>> TryCastFrom<State> for (T1, T2, T3)
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for BTree
impl TryCastFrom<State> for BTree
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for BlockChain<CollectionBase>
impl TryCastFrom<State> for BlockChain<CollectionBase>
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Box<dyn ClosureInstance<State>>
impl TryCastFrom<State> for Box<dyn ClosureInstance<State>>
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Bytes
impl TryCastFrom<State> for Bytes
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Chain<CollectionBase>
impl TryCastFrom<State> for Chain<CollectionBase>
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Closure
impl TryCastFrom<State> for Closure
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Collection
impl TryCastFrom<State> for Collection
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for CollectionBase
impl TryCastFrom<State> for CollectionBase
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Float
impl TryCastFrom<State> for Float
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Host
impl TryCastFrom<State> for Host
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Id
impl TryCastFrom<State> for Id
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for IdRef
impl TryCastFrom<State> for IdRef
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for InstanceClass
impl TryCastFrom<State> for InstanceClass
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<InstanceClass>
fn opt_cast_from(state: State) -> Option<InstanceClass>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Link
impl TryCastFrom<State> for Link
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<T: TryCastFrom<State>> TryCastFrom<State> for Map<T>
impl<T: TryCastFrom<State>> TryCastFrom<State> for Map<T>
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Number
impl TryCastFrom<State> for Number
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for OpDef
impl TryCastFrom<State> for OpDef
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for OpRef
impl TryCastFrom<State> for OpRef
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Scalar
impl TryCastFrom<State> for Scalar
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for TCPathBuf
impl TryCastFrom<State> for TCPathBuf
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for TCString
impl TryCastFrom<State> for TCString
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Table
impl TryCastFrom<State> for Table
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Tensor
impl TryCastFrom<State> for Tensor
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<T: TryCastFrom<State>> TryCastFrom<State> for Tuple<T>
impl<T: TryCastFrom<State>> TryCastFrom<State> for Tuple<T>
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for Value
impl TryCastFrom<State> for Value
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<T: TryCastFrom<State>> TryCastFrom<State> for Vec<T>
impl<T: TryCastFrom<State>> TryCastFrom<State> for Vec<T>
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for bool
impl TryCastFrom<State> for bool
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for u64
impl TryCastFrom<State> for u64
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<State> for usize
impl TryCastFrom<State> for usize
source§fn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(state: State) -> Option<Self>
fn opt_cast_from(state: State) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryFrom<State> for Collection
impl TryFrom<State> for Collection
Auto Trait Implementations§
impl !RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl !UnwindSafe for State
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<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<State, T> Public<State> for T
impl<State, T> Public<State> for T
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
key: Value
) -> Pin<Box<dyn Future<Output = Result<State, TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
key: Value,
value: State
) -> Pin<Box<dyn Future<Output = Result<(), TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn post<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
params: Map<State>
) -> Pin<Box<dyn Future<Output = Result<State, TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
key: Value
) -> Pin<Box<dyn Future<Output = Result<(), TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
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
.