FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TreeDataGridSourceRef

    struct · ferroui-controls-treedatagrid · v0.5.0

    struct TreeDataGridSourceRef
    

    A shared core source as the value of a property of the grid (Source, Model): the core's source trait object, compared by identity.

    The conversions from the typed sources register the typed operations of their model type (register_tree_data_grid_model), which the untyped presentation needs to create row and cell selections and to follow the columns; a source handed over as an untyped Rc<dyn ITreeDataGridSource> relies on its type having been registered.

    View source

    Members

    new

    fn new(source: Rc<dyn ITreeDataGridSource>) -> Self
    

    The handle of an untyped source.

    Source

    of

    fn of<M: TreeModel, S: ITreeDataGridSourceOf<M> + 'static>(source: Rc<S>) -> Self
    

    The handle of a typed source of models of M, registering the source and model types.

    Source

    source

    fn source(self: &Self) -> &Rc<dyn ITreeDataGridSource>
    

    The source.

    Source

    downcast

    fn downcast<T: 'static>(self: &Self) -> Option<Rc<T>>
    

    The source as the concrete source type T.

    Source

    ptr_eq

    fn ptr_eq(self: &Self, other: &TreeDataGridSourceRef) -> bool
    

    Whether two handles hold the same source.

    Source

    is

    fn is(self: &Self, source: &Rc<dyn ITreeDataGridSource>) -> bool
    

    Whether the handle holds source.

    Source

    register_binding_conversion

    fn register_binding_conversion<M: TreeModel>()
    

    Lets bindings deliver a value of the core's sources of models of M to a property of type Option<TreeDataGridSourceRef> (or TreeDataGridSourceRef) on the current thread, as ItemsSource::register_binding_conversion does for collections.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Receiver
    • Any
    • ToOwned
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • TreeModel
    • Clone
    • PartialEq
    • Debug
    • Deref
    • From<Rc<dyn ITreeDataGridSource>>
    • From<Rc<FlatTreeDataGridSource<M>>>
    • From<Rc<HierarchicalTreeDataGridSource<M>>>

    Availability

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