Enum tinychain::state::State [−][src]
An addressable state with a discrete value per-transaction.
Variants
Chain(Chain)
Map(Map<Self>)
Object(Object)
Scalar(Scalar)
Tuple(Tuple<Self>)
Implementations
impl State
[src]
pub fn is_none(&self) -> bool
[src]
pub fn is_some(&self) -> bool
[src]
pub fn is_ref(&self) -> bool
[src]
Return true if this State
is a reference that needs to be resolved.
pub fn into_type(self, class: StateType) -> Option<Self>
[src]
Cast this State
into the given StateType
, if possible.
Trait Implementations
impl Clone for State
[src]
impl Default for State
[src]
impl Display for State
[src]
impl From<()> for State
[src]
impl From<Box<TCRef, Global>> for State
[src]
impl From<Chain> for State
[src]
impl<T: Instance> From<InstanceExt<T>> for State where
State: From<T>,
[src]
State: From<T>,
fn from(instance: InstanceExt<T>) -> State
[src]
impl From<Link> for State
[src]
impl From<Map<Scalar>> for State
[src]
impl From<Map<State>> for State
[src]
impl From<OpRef> for State
[src]
impl From<Scalar> for State
[src]
impl From<TCRef> for State
[src]
impl From<Tuple<Scalar>> for State
[src]
impl From<Tuple<State>> for State
[src]
impl From<Tuple<Value>> for State
[src]
impl From<Value> for State
[src]
impl FromStream for State
[src]
type Context = Txn
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
fn from_stream<'life0, 'async_trait, D: Decoder>(
txn: Txn,
decoder: &'life0 mut D
) -> Pin<Box<dyn Future<Output = Result<Self, D::Error>> + Send + 'async_trait>> where
D: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
txn: Txn,
decoder: &'life0 mut D
) -> Pin<Box<dyn Future<Output = Result<Self, D::Error>> + Send + 'async_trait>> where
D: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
impl Instance for State
[src]
impl Refer for State
[src]
fn requires(&self, deps: &mut HashSet<Id>)
[src]
fn resolve<'a, 'async_trait, T: Instance + Public>(
self,
context: &'a Scope<'a, T>,
txn: &'a Txn
) -> Pin<Box<dyn Future<Output = TCResult<Self>> + Send + 'async_trait>> where
'a: 'async_trait,
T: 'async_trait,
Self: 'async_trait,
[src]
self,
context: &'a Scope<'a, T>,
txn: &'a Txn
) -> Pin<Box<dyn Future<Output = TCResult<Self>> + Send + 'async_trait>> where
'a: 'async_trait,
T: 'async_trait,
Self: 'async_trait,
impl<T: Clone + TryCastFrom<State>> TryCastFrom<State> for Map<T>
[src]
fn can_cast_from(state: &State) -> bool
[src]
fn opt_cast_from(state: State) -> Option<Self>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl TryCastFrom<State> for IdRef
[src]
fn can_cast_from(state: &State) -> bool
[src]
fn opt_cast_from(state: State) -> Option<Self>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl TryCastFrom<State> for Link
[src]
fn can_cast_from(state: &State) -> bool
[src]
fn opt_cast_from(state: State) -> Option<Self>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl TryCastFrom<State> for OpDef
[src]
fn can_cast_from(state: &State) -> bool
[src]
fn opt_cast_from(state: State) -> Option<Self>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl TryCastFrom<State> for OpRef
[src]
fn can_cast_from(state: &State) -> bool
[src]
fn opt_cast_from(state: State) -> Option<Self>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl TryCastFrom<State> for Scalar
[src]
fn can_cast_from(state: &State) -> bool
[src]
fn opt_cast_from(state: State) -> Option<Self>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl TryCastFrom<State> for Value
[src]
fn can_cast_from(state: &State) -> bool
[src]
fn opt_cast_from(state: State) -> Option<Self>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl TryFrom<State> for Map<State>
[src]
type Error = TCError
The type returned in the event of a conversion error.
fn try_from(state: State) -> TCResult<Map<State>>
[src]
impl TryFrom<State> for Value
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<F, T> CastFrom<F> for T where
T: From<F>,
[src]
T: From<F>,
impl<T, F> CastInto<F> for T where
F: CastFrom<T>,
[src]
F: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<F> Match for F
[src]
pub fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
[src]
T: TryCastFrom<Self>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
[src]
T: CastFrom<F>,
pub fn can_cast_from(&F) -> bool
[src]
pub fn opt_cast_from(f: F) -> Option<T>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
[src]
T: TryCastFrom<F>,
pub fn can_cast_into(&self) -> bool
[src]
pub fn opt_cast_into(self) -> Option<T>
[src]
pub fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
[src]
OnErr: FnOnce(&Self) -> Err,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,