Struct tinychain::object::InstanceClass
source · pub struct InstanceClass { /* private fields */ }
Expand description
A user-defined class.
Implementations§
source§impl InstanceClass
impl InstanceClass
Trait Implementations§
source§impl AsType<InstanceClass> for CacheBlock
impl AsType<InstanceClass> for CacheBlock
source§fn as_type(&self) -> Option<&InstanceClass>
fn as_type(&self) -> Option<&InstanceClass>
Borrow this instance as an instance of
T
if possible.source§fn as_type_mut(&mut self) -> Option<&mut InstanceClass>
fn as_type_mut(&mut self) -> Option<&mut InstanceClass>
Borrow this instance mutably as an instance of
T
if possible.source§fn into_type(self) -> Option<InstanceClass>
fn into_type(self) -> Option<InstanceClass>
Convert this instance into an instance of
T
if possible.source§impl CastFrom<InstanceClass> for Scalar
impl CastFrom<InstanceClass> for Scalar
source§fn cast_from(class: InstanceClass) -> Self
fn cast_from(class: InstanceClass) -> Self
Cast an instance of
T
into an instance of Self
.source§impl CastFrom<Link> for InstanceClass
impl CastFrom<Link> for InstanceClass
source§impl Clone for InstanceClass
impl Clone for InstanceClass
source§fn clone(&self) -> InstanceClass
fn clone(&self) -> InstanceClass
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InstanceClass
impl Debug for InstanceClass
source§impl Default for InstanceClass
impl Default for InstanceClass
source§fn default() -> InstanceClass
fn default() -> InstanceClass
Returns the “default value” for a type. Read more
source§impl Display for InstanceClass
impl Display for InstanceClass
source§impl From<InstanceClass> for CacheBlock
impl From<InstanceClass> for CacheBlock
source§fn from(t: InstanceClass) -> Self
fn from(t: InstanceClass) -> Self
Converts to this type from the input type.
source§impl From<InstanceClass> for Object
impl From<InstanceClass> for Object
source§fn from(class: InstanceClass) -> Object
fn from(class: InstanceClass) -> Object
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<StateType> for InstanceClass
impl From<StateType> for InstanceClass
source§impl FromStream for InstanceClass
impl FromStream for InstanceClass
source§impl<'a, D: Digest> Hash<D> for &'a InstanceClass
impl<'a, D: Digest> Hash<D> for &'a InstanceClass
source§impl<D: Digest> Hash<D> for InstanceClass
impl<D: Digest> Hash<D> for InstanceClass
source§impl Instance for InstanceClass
impl Instance for InstanceClass
§type Class = ObjectType
type Class = ObjectType
The
Class
type of this instancesource§fn class(&self) -> ObjectType
fn class(&self) -> ObjectType
Returns the [
Class]
of this instance.source§impl<'en> IntoStream<'en> for InstanceClass
impl<'en> IntoStream<'en> for InstanceClass
source§impl PartialEq<InstanceClass> for InstanceClass
impl PartialEq<InstanceClass> for InstanceClass
source§fn eq(&self, other: &InstanceClass) -> bool
fn eq(&self, other: &InstanceClass) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'en> ToStream<'en> for InstanceClass
impl<'en> ToStream<'en> for InstanceClass
source§impl TryCastFrom<(Subject, Map<Scalar>)> for InstanceClass
impl TryCastFrom<(Subject, Map<Scalar>)> for InstanceClass
source§fn can_cast_from(value: &PostRef) -> bool
fn can_cast_from(value: &PostRef) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(value: PostRef) -> Option<Self>
fn opt_cast_from(value: PostRef) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<InstanceClass> for Link
impl TryCastFrom<InstanceClass> for Link
source§fn can_cast_from(class: &InstanceClass) -> bool
fn can_cast_from(class: &InstanceClass) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(class: InstanceClass) -> Option<Self>
fn opt_cast_from(class: InstanceClass) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<InstanceClass> for StateType
impl TryCastFrom<InstanceClass> for StateType
source§fn can_cast_from(class: &InstanceClass) -> bool
fn can_cast_from(class: &InstanceClass) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(class: InstanceClass) -> Option<Self>
fn opt_cast_from(class: InstanceClass) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<InstanceClass> for Value
impl TryCastFrom<InstanceClass> for Value
source§fn can_cast_from(class: &InstanceClass) -> bool
fn can_cast_from(class: &InstanceClass) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(class: InstanceClass) -> Option<Self>
fn opt_cast_from(class: InstanceClass) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<OpRef> for InstanceClass
impl TryCastFrom<OpRef> for InstanceClass
source§fn can_cast_from(op_ref: &OpRef) -> bool
fn can_cast_from(op_ref: &OpRef) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(op_ref: OpRef) -> Option<Self>
fn opt_cast_from(op_ref: OpRef) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Scalar> for InstanceClass
impl TryCastFrom<Scalar> for InstanceClass
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<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<TCRef> for InstanceClass
impl TryCastFrom<TCRef> for InstanceClass
source§fn can_cast_from(tc_ref: &TCRef) -> bool
fn can_cast_from(tc_ref: &TCRef) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(tc_ref: TCRef) -> Option<Self>
fn opt_cast_from(tc_ref: TCRef) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl TryCastFrom<Value> for InstanceClass
impl TryCastFrom<Value> for InstanceClass
source§fn can_cast_from(value: &Value) -> bool
fn can_cast_from(value: &Value) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(value: Value) -> Option<Self>
fn opt_cast_from(value: Value) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.impl Class for InstanceClass
impl Eq for InstanceClass
impl StructuralEq for InstanceClass
impl StructuralPartialEq for InstanceClass
Auto Trait Implementations§
impl RefUnwindSafe for InstanceClass
impl Send for InstanceClass
impl Sync for InstanceClass
impl Unpin for InstanceClass
impl UnwindSafe for InstanceClass
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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
.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
.