Struct tinychain::object::InstanceClass
source · [−]pub struct InstanceClass { /* private fields */ }
Expand description
A user-defined class.
Implementations
sourceimpl InstanceClass
impl InstanceClass
Trait Implementations
sourceimpl CastFrom<InstanceClass> for Scalar
impl CastFrom<InstanceClass> for Scalar
sourcefn cast_from(class: InstanceClass) -> Self
fn cast_from(class: InstanceClass) -> Self
Cast an instance of T
into an instance of Self
.
sourceimpl CastFrom<InstanceClass> for Value
impl CastFrom<InstanceClass> for Value
sourcefn cast_from(class: InstanceClass) -> Self
fn cast_from(class: InstanceClass) -> Self
Cast an instance of T
into an instance of Self
.
sourceimpl Clone for InstanceClass
impl Clone for InstanceClass
sourcefn clone(&self) -> InstanceClass
fn clone(&self) -> InstanceClass
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for InstanceClass
impl Debug for InstanceClass
sourceimpl Default for InstanceClass
impl Default for InstanceClass
sourcefn default() -> InstanceClass
fn default() -> InstanceClass
Returns the “default value” for a type. Read more
sourceimpl Display for InstanceClass
impl Display for InstanceClass
sourceimpl From<InstanceClass> for Link
impl From<InstanceClass> for Link
sourcefn from(ic: InstanceClass) -> Link
fn from(ic: InstanceClass) -> Link
Converts to this type from the input type.
sourceimpl From<InstanceClass> for Object
impl From<InstanceClass> for Object
sourcefn from(class: InstanceClass) -> Object
fn from(class: InstanceClass) -> Object
Converts to this type from the input type.
sourceimpl From<StateType> for InstanceClass
impl From<StateType> for InstanceClass
sourceimpl FromStream for InstanceClass
impl FromStream for InstanceClass
sourceimpl<D: Digest> Hash<D> for InstanceClass
impl<D: Digest> Hash<D> for InstanceClass
sourceimpl<'a, D: Digest> Hash<D> for &'a InstanceClass
impl<'a, D: Digest> Hash<D> for &'a InstanceClass
sourceimpl Instance for InstanceClass
impl Instance for InstanceClass
type Class = ObjectType
type Class = ObjectType
The Class
type of this instance
sourcefn class(&self) -> ObjectType
fn class(&self) -> ObjectType
Returns the [Class]
of this instance.
sourceimpl<'en> IntoStream<'en> for InstanceClass
impl<'en> IntoStream<'en> for InstanceClass
sourceimpl PartialEq<InstanceClass> for InstanceClass
impl PartialEq<InstanceClass> for InstanceClass
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &InstanceClass) -> bool
fn ne(&self, other: &InstanceClass) -> bool
This method tests for !=
.
sourceimpl TryCastFrom<InstanceClass> for StateType
impl TryCastFrom<InstanceClass> for StateType
sourcefn can_cast_from(class: &InstanceClass) -> bool
fn can_cast_from(class: &InstanceClass) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
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
.
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
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<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
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