pub enum State {
Collection(Collection),
Chain(Chain),
Closure(Closure),
Map(Map<Self>),
Object(Object),
Scalar(Scalar),
Stream(TCStream),
Tuple(Tuple<Self>),
}
Expand description
An addressable state with a discrete value per-transaction.
Variants
Collection(Collection)
Chain(Chain)
Closure(Closure)
Map(Map<Self>)
Object(Object)
Scalar(Scalar)
Stream(TCStream)
Tuple(Tuple<Self>)
Implementations
sourceimpl State
impl State
sourcepub fn hash<'a>(self, txn: Txn) -> TCBoxTryFuture<'a, Output<Sha256>>
pub fn hash<'a>(self, txn: Txn) -> TCBoxTryFuture<'a, Output<Sha256>>
Compute the SHA256 hash of this State
.
sourcepub fn is_ref(&self) -> bool
pub fn is_ref(&self) -> bool
Return true if this State
is a reference that needs to be resolved.
pub fn try_into_tuple<Err: Fn(State) -> TCError>(
self,
err: Err
) -> TCResult<Tuple<State>>
Trait Implementations
sourceimpl<T1, T2, T3, T4> CastFrom<(T1, T2, T3, T4)> for State where
State: CastFrom<T1>,
State: CastFrom<T2>,
State: CastFrom<T3>,
State: CastFrom<T4>,
impl<T1, T2, T3, T4> CastFrom<(T1, T2, T3, T4)> for State where
State: CastFrom<T1>,
State: CastFrom<T2>,
State: CastFrom<T3>,
State: CastFrom<T4>,
sourceimpl<T1, T2, T3> CastFrom<(T1, T2, T3)> for State where
State: CastFrom<T1>,
State: CastFrom<T2>,
State: CastFrom<T3>,
impl<T1, T2, T3> CastFrom<(T1, T2, T3)> for State where
State: CastFrom<T1>,
State: CastFrom<T2>,
State: CastFrom<T3>,
sourceimpl From<Collection> for State
impl From<Collection> for State
sourcefn from(collection: Collection) -> Self
fn from(collection: Collection) -> Self
Converts to this type from the input type.
sourceimpl FromStream for State
impl FromStream for State
sourceimpl Refer for State
impl Refer for State
sourcefn dereference_self(self, path: &TCPathBuf) -> Self
fn dereference_self(self, path: &TCPathBuf) -> Self
Replace references to “$self” with the given relative path. Read more
sourcefn is_conditional(&self) -> bool
fn is_conditional(&self) -> bool
Return true
if this is a conditional reference (e.g. If
or Case
).
sourcefn 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.
sourcefn reference_self(self, path: &TCPathBuf) -> Self
fn reference_self(self, path: &TCPathBuf) -> Self
Replace the given relative path with “$self”. Read more
sourcefn 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.
sourcefn resolve<'a, 'async_trait, T>(
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 + ToState + Instance + Public,
Self: 'async_trait,
fn resolve<'a, 'async_trait, T>(
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 + ToState + Instance + Public,
Self: 'async_trait,
Resolve this reference with respect to the given context.
sourceimpl TryCastFrom<State> for bool
impl TryCastFrom<State> for bool
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for Bytes
impl TryCastFrom<State> for Bytes
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<T: TryCastFrom<State>> TryCastFrom<State> for Tuple<T>
impl<T: TryCastFrom<State>> TryCastFrom<State> for Tuple<T>
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for Id
impl TryCastFrom<State> for Id
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for IdRef
impl TryCastFrom<State> for IdRef
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for Link
impl TryCastFrom<State> for Link
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for InstanceClass
impl TryCastFrom<State> for InstanceClass
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for OpDef
impl TryCastFrom<State> for OpDef
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for OpRef
impl TryCastFrom<State> for OpRef
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for Scalar
impl TryCastFrom<State> for Scalar
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for TCPathBuf
impl TryCastFrom<State> for TCPathBuf
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for Value
impl TryCastFrom<State> for Value
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for Closure
impl TryCastFrom<State> for Closure
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for Float
impl TryCastFrom<State> for Float
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for Number
impl TryCastFrom<State> for Number
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for u64
impl TryCastFrom<State> for u64
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for TCString
impl TryCastFrom<State> for TCString
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<T: Clone + TryCastFrom<State>> TryCastFrom<State> for Map<T>
impl<T: Clone + TryCastFrom<State>> TryCastFrom<State> for Map<T>
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl TryCastFrom<State> for TCStream
impl TryCastFrom<State> for TCStream
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<T: TryCastFrom<State>> TryCastFrom<State> for (T,)
impl<T: TryCastFrom<State>> TryCastFrom<State> for (T,)
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<T1: TryCastFrom<State>, T2: TryCastFrom<State>> TryCastFrom<State> for (T1, T2)
impl<T1: TryCastFrom<State>, T2: TryCastFrom<State>> TryCastFrom<State> for (T1, T2)
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<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)
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<T: TryCastFrom<State>> TryCastFrom<State> for Vec<T>
impl<T: TryCastFrom<State>> TryCastFrom<State> for Vec<T>
sourcefn can_cast_from(state: &State) -> bool
fn can_cast_from(state: &State) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<F> Match for F
impl<F> Match for F
sourcefn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
Returns true
if self
can be cast into the target type T
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
sourcefn can_cast_from(&F) -> bool
fn can_cast_from(&F) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
sourcefn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if self
can be cast into T
.
sourcefn 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
.
sourcefn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more