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>.
Members
new
fn new() -> Self
A new control of the class, typed by VM (new ReactiveUserControl<TViewModel>()).
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.
control
fn control(self: &Self) -> &Ref<C>
The control.
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).
set_view_model
fn set_view_model(self: &Self, view_model: Option<Rc<VM>>)
Sets the view model (ViewModel { set; }).
into_view_for_of
fn into_view_for_of(self: Self) -> Rc<dyn IViewForOf<VM>>
The view as IViewFor<TViewModel>.
into_view_for
fn into_view_for(self: Self) -> Rc<dyn IViewFor>
The view as IViewFor.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyToOwnedClassDefaultsErasedDestructorIntoEitherIntoViewForCloneDefaultDerefIViewControlIActivatableViewIViewForIViewForOf<VM>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.