Struct tinychain::object::InstanceExt [−][src]
pub struct InstanceExt<T: Instance> { /* fields omitted */ }
A user-defined instance, subclassing T
.
Implementations
impl<T: Instance> InstanceExt<T>
[src]
impl<T: Instance> InstanceExt<T>
[src]pub fn new(parent: T, class: InstanceClass) -> InstanceExt<T>
[src]
Construct a new instance of the given user-defined InstanceClass
.
pub fn parent(&self) -> &T
[src]
Return the parent of this instance.
pub fn proto(&self) -> &Map<Scalar>
[src]
Return the class prototype of this instance.
pub fn try_into<E, O: Instance + TryFrom<T, Error = E>>(
self
) -> Result<InstanceExt<O>, E>
[src]
self
) -> Result<InstanceExt<O>, E>
Convert the native type of this instance, if possible.
Trait Implementations
impl<T: Clone + Instance> Clone for InstanceExt<T>
[src]
impl<T: Clone + Instance> Clone for InstanceExt<T>
[src]fn clone(&self) -> InstanceExt<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Instance> Deref for InstanceExt<T>
[src]
impl<T: Instance> Deref for InstanceExt<T>
[src]impl<T: Instance> Display for InstanceExt<T>
[src]
impl<T: Instance> Display for InstanceExt<T>
[src]impl From<InstanceExt<State>> for Object
[src]
impl From<InstanceExt<State>> for Object
[src]fn from(instance: InstanceExt<State>) -> Object
[src]
impl<T: Instance> From<InstanceExt<T>> for State where
State: From<T>,
[src]
impl<T: Instance> From<InstanceExt<T>> for State where
State: From<T>,
[src]fn from(instance: InstanceExt<T>) -> State
[src]
impl<T: Instance> Instance for InstanceExt<T>
[src]
impl<T: Instance> Instance for InstanceExt<T>
[src]impl<'en, T: Instance + IntoStream<'en> + 'en> IntoStream<'en> for InstanceExt<T>
[src]
impl<'en, T: Instance + IntoStream<'en> + 'en> IntoStream<'en> for InstanceExt<T>
[src]Auto Trait Implementations
impl<T> RefUnwindSafe for InstanceExt<T> where
T: RefUnwindSafe,
impl<T> RefUnwindSafe for InstanceExt<T> where
T: RefUnwindSafe,
impl<T> Send for InstanceExt<T>
impl<T> Send for InstanceExt<T>
impl<T> Sync for InstanceExt<T>
impl<T> Sync for InstanceExt<T>
impl<T> Unpin for InstanceExt<T>
impl<T> Unpin for InstanceExt<T>
impl<T> UnwindSafe for InstanceExt<T> where
T: UnwindSafe,
impl<T> UnwindSafe for InstanceExt<T> where
T: UnwindSafe,
Blanket Implementations
impl<T> Instrument 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> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
[src]
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
[src]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]
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
[src]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<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,