FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ReactiveView

    struct · ferroui-reactiveui-controls · v0.5.0

    struct ReactiveView<C: ITypedReactiveViewClass, VM: PartialEq + 'static>
    

    A reactive view class instance typed by its view model (ReactiveUserControl<TViewModel>, ReactiveWindow<TViewModel>): a handle that dereferences to the control and, shared as an Rc, is its IViewFor<TViewModel>.

    View source

    Members

    new

    fn new() -> Self
    

    A new control of the class, typed by VM (new ReactiveUserControl<TViewModel>()).

    Source

    from_control

    fn from_control(control: impl IntoRef<C>) -> Self
    

    control (an instance of the class or of a class derived from it, as one of markup), typed by VM: from now on it takes only view models of type VM from its DataContext.

    Source

    control

    fn control(self: &Self) -> &Ref<C>
    

    The control.

    Source

    view_model

    fn view_model(self: &Self) -> Option<Rc<VM>>
    

    The view model (ViewModel { get; }): None when the control holds none, or holds a view model of another type (which only the untyped IViewFor can set).

    Source

    set_view_model

    fn set_view_model(self: &Self, view_model: Option<Rc<VM>>)
    

    Sets the view model (ViewModel { set; }).

    Source

    into_view_for_of

    fn into_view_for_of(self: Self) -> Rc<dyn IViewForOf<VM>>
    

    The view as IViewFor<TViewModel>.

    Source

    into_view_for

    fn into_view_for(self: Self) -> Rc<dyn IViewFor>
    

    The view as IViewFor.

    Source

    Trait implementations

    Availability

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