ViewHostNavigation
struct · ferroui-reactiveui-controls · v0.5.0
struct ViewHostNavigation
Resolves and wires the view a content host displays for a view model (ViewHostNavigation).
Members
resolve_view
fn resolve_view<H: IEnableLogger>(host: &H, view_model: Rc<dyn Any>, contract: Option<&str>, view_locator: Option<Rc<dyn IViewLocator>>) -> Option<Rc<dyn IViewFor>>
Resolves the view for a view model and hands it the view model (ResolveView): the view
gets the view model through its ViewModel and, when it is a control, its DataContext.
None when no view is registered for the view model.
view_locator is the locator to use, or None for the current one.
content_of_view
fn content_of_view(view: &Rc<dyn IViewFor>) -> BoxedValue
The content that displays view: its control, or the view itself when it is not one.
subscribe
fn subscribe(navigation: Rc<dyn IObservable<NavigationTarget>>, navigate: impl Fn(Option<Rc<dyn Any>>, Option<String>) -> () + 'static) -> Rc<dyn IDisposable>
Subscribes a host's navigation stream and returns the subscription it owns while attached
(Subscribe); navigate displays the view for a target. An error of the stream is
rethrown (SubscriptionErrors::throw).
release
fn release(disposables: &RefCell<Option<Rc<dyn IDisposable>>>)
Disposes the supplied subscriptions and clears the reference (Release).
The reference is cleared before disposal so a re-entrant detach cannot dispose the same set twice.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.