BehaviorOfT
struct · ferroui-xaml-interactivity · v0.5.0
struct BehaviorOfT
A base class for behaviors making them code compatible with older frameworks, and allow for
typed associated objects (Behavior<T>).
Deviation (DEVIATIONS.md, Behaviors): classes of the class model are not generic. The type
argument T of the reference is the runtime type a deriving class passes to
construct; attaching the behavior to an object of another type panics as
the reference throws, and associated_object_as is the typed
AssociatedObject of the reference.
Members
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<BehaviorOfT>
Returns a strong reference to this object.
construct
fn construct(associated_type: &'static TypeInfo) -> Self
Creates the class data for behaviors attached to objects of associated_type (the T of
the reference); see FerroObject::construct.
associated_type
fn associated_type(self: &Self) -> &'static TypeInfo
The type of the objects the behavior attaches to (the T of the reference).
associated_object_as
fn associated_object_as<T: ObjectType>(self: &Self) -> Option<Ref<T>>
Gets the object to which this behavior is attached, as T.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBehaviorImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<BehaviorOfT>StaticTypeObjectTypeSubclassable<T>FerroObjectImplBehaviorImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.