ViewModelType
struct · ferroui-reactiveui · v0.5.0
struct ViewModelType
The compile-time type of a view model, as a value (what upstream's TViewModel gives a generic
resolution): its TypeId, its name, and how to ask the service locator for its view
(IViewFor<TViewModel>, here dyn IViewForOf<VM>).
Not an upstream type: Rust cannot close IViewFor<> over a type known only at run time
(MakeGenericType), so the lookup is made where the type is known, by of.
Members
of
fn of<VM: 'static>() -> Self
The type VM.
id
fn id(self: &Self) -> TypeId
The TypeId of the type.
type_name
fn type_name(self: &Self) -> &'static str
The name of the type (Type.Name, here the path of the type).
service_view
fn service_view(self: &Self, contract: Option<&str>) -> Option<Rc<dyn IViewFor>>
The last view registered in the service locator as dyn IViewForOf<VM> under contract
(None and an empty contract are the default registration), or None
(AppLocator.Current.GetService<IViewFor<TViewModel>>(contract)).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedCloneCopyDebugPartialEqEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.