FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    StyledElementBehaviorOfT

    struct · ferroui-xaml-interactivity · v0.5.0

    struct StyledElementBehaviorOfT
    

    A base class for behaviors making them code compatible with older frameworks, and allow for typed associated objects (StyledElementBehavior<T>).

    Deviation (DEVIATIONS.md, Behaviors): the type argument T of the reference is the runtime type a deriving class passes to construct; see BehaviorOfT.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<StyledElementBehaviorOfT>
    

    Returns a strong reference to this object.

    Source

    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 ferroui_base::FerroObject::construct.

    Source

    associated_type

    fn associated_type(self: &Self) -> &'static TypeInfo
    

    The type of the objects the behavior attaches to (the T of the reference).

    Source

    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.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.