FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IReactiveUIBuilder

    trait · ferroui-reactiveui · v0.5.0

    trait IReactiveUIBuilder: IAppBuilder
    

    The builder of a ReactiveUI application (IReactiveUIBuilder): the services, schedulers and state of ReactiveUI, configured by chained calls, then built once.

    Deviation (DEVIATIONS.md, ReactiveUI): a trait object cannot have generic methods, so this trait has the methods of upstream's interface that are not generic, each returning the builder as a trait object; the generic ones (RegisterView<TView, TViewModel>, WithPlatformModule<T>, WithSuspensionHost<TAppState>, WithConverter<TFrom, TTo>) are those of ReactiveUIBuilderExt, which every builder has, and WithInstance is ReactiveUIInstanceMixins::with_instance of the built application. Upstream's overloads have their own names: the forms with a flag that says whether to set RxSchedulers end in _with, and the forms that take a factory end in _factory. The concrete ReactiveUIBuilder has the same methods, returning itself, so that a chain of calls on it keeps every method at hand.

    View source

    Members

    with_message_bus

    fn with_message_bus(self: &Self) -> &dyn IReactiveUIBuilder
    

    Registers a new message bus when the application is built (WithMessageBus()).

    Source

    with_message_bus_with

    fn with_message_bus_with(self: &Self, configure: Rc<dyn Fn(&dyn IMessageBus) -> ()>) -> &dyn IReactiveUIBuilder
    

    Registers a new message bus, configured by configure, when the application is built (WithMessageBus(Action<IMessageBus>)).

    Source

    with_message_bus_instance

    fn with_message_bus_instance(self: &Self, message_bus: Rc<dyn IMessageBus>) -> &dyn IReactiveUIBuilder
    

    Registers message_bus when the application is built (WithMessageBus(IMessageBus)).

    Source

    configure_suspension_driver

    fn configure_suspension_driver(self: &Self, configure: Rc<dyn Fn(&Rc<dyn ISuspensionDriver>) -> ()>) -> &dyn IReactiveUIBuilder
    

    Configures the registered suspension driver, if there is one, when the application is built (ConfigureSuspensionDriver(Action<ISuspensionDriver>)).

    Source

    configure_view_locator

    fn configure_view_locator(self: &Self, configure: Rc<dyn Fn(&DefaultViewLocator) -> ()>) -> &dyn IReactiveUIBuilder
    

    Configures the registered DefaultViewLocator when the application is built, keeping its mappings; with none registered, a new one is configured and registered as the view locator (ConfigureViewLocator(Action<DefaultViewLocator>)).

    Source

    for_custom_platform

    fn for_custom_platform(self: &Self, main_thread_scheduler: Rc<dyn IScheduler>, platform_services: ResolverAction) -> &dyn IReactiveUIBuilder
    

    Configures a platform of the application's own: its main thread scheduler, and its services, registered when the application is built (ForCustomPlatform(ISequencer, Action<IMutableDependencyResolver>)).

    Source

    for_platforms

    fn for_platforms(self: &Self, platform_configurations: &[&dyn Fn(&dyn IReactiveUIBuilder) -> ()]) -> &dyn IReactiveUIBuilder
    

    Applies the configuration of each platform (ForPlatforms(params Action<IReactiveUIBuilder>[])).

    Source

    with_main_thread_scheduler

    fn with_main_thread_scheduler(self: &Self, scheduler: Rc<dyn IScheduler>) -> &dyn IReactiveUIBuilder
    

    Sets the scheduler of the user-interface thread, which also becomes RxSchedulers::main_thread_scheduler when the application is built (WithMainThreadScheduler(ISequencer)).

    Source

    with_main_thread_scheduler_with

    fn with_main_thread_scheduler_with(self: &Self, scheduler: Rc<dyn IScheduler>, set_rx_app: bool) -> &dyn IReactiveUIBuilder
    

    Sets the scheduler of the user-interface thread; set_rx_app says whether it becomes RxSchedulers::main_thread_scheduler (WithMainThreadScheduler(ISequencer, bool)).

    Source

    with_platform_services

    fn with_platform_services(self: &Self) -> &dyn IReactiveUIBuilder
    

    Registers the services of the platform, once (WithPlatformServices).

    Source

    with_registration

    fn with_registration(self: &Self, configure_action: &dyn Fn(&dyn IMutableDependencyResolver) -> ()) -> &dyn IReactiveUIBuilder
    

    Applies configure_action to the resolver at once (WithRegistration(Action<IMutableDependencyResolver>)).

    Source

    with_registrations

    fn with_registrations(self: &Self, registration: &dyn IWantsToRegisterStuff) -> &dyn IReactiveUIBuilder
    

    Applies registration to the resolver at once, through a DependencyResolverRegistrar (WithRegistration(IWantsToRegisterStuff)).

    Source

    with_registration_on_build

    fn with_registration_on_build(self: &Self, configure_action: ResolverAction) -> &dyn IReactiveUIBuilder
    

    Applies configure_action to the resolver when the application is built (WithRegistrationOnBuild(Action<IMutableDependencyResolver>)).

    Source

    with_task_pool_scheduler

    fn with_task_pool_scheduler(self: &Self, scheduler: Rc<dyn IScheduler>) -> &dyn IReactiveUIBuilder
    

    Sets the scheduler of background work, which also becomes RxSchedulers::task_pool_scheduler when the application is built (WithTaskPoolScheduler(ISequencer)).

    Source

    with_task_pool_scheduler_with

    fn with_task_pool_scheduler_with(self: &Self, scheduler: Rc<dyn IScheduler>, set_rx_app: bool) -> &dyn IReactiveUIBuilder
    

    Sets the scheduler of background work; set_rx_app says whether it becomes RxSchedulers::task_pool_scheduler (WithTaskPoolScheduler(ISequencer, bool)).

    Source

    with_exception_handler

    fn with_exception_handler(self: &Self, exception_handler: Rc<dyn IObserver<ObservableError>>) -> &dyn IReactiveUIBuilder
    

    Sets the handler of the errors that no thrown_exceptions subscriber handles (WithExceptionHandler(IObserver<Exception>)).

    Source

    with_suspension_host

    fn with_suspension_host(self: &Self) -> &dyn IReactiveUIBuilder
    

    Sets a suspension host, which becomes the one of RxSuspension when the application is built (WithSuspensionHost()).

    Source

    with_suspension_host_instance

    fn with_suspension_host_instance(self: &Self, suspension_host: Rc<dyn ISuspensionHost>) -> &dyn IReactiveUIBuilder
    

    Sets suspension_host as the suspension host: the form of WithSuspensionHost<TAppState>() that a trait object can have, which ReactiveUIBuilderExt::with_suspension_host_of calls.

    Source

    with_cache_sizes

    fn with_cache_sizes(self: &Self, small_cache_limit: usize, big_cache_limit: usize) -> &dyn IReactiveUIBuilder
    

    Sets the limits of the caches of ReactiveUI (WithCacheSizes(int, int)).

    Panics

    When a limit is zero (ArgumentOutOfRangeException).

    Source

    with_converter

    fn with_converter(self: &Self, converter: Rc<dyn IBindingTypeConverter>) -> &dyn IReactiveUIBuilder
    

    Registers a converter of a pair of types (WithConverter(IBindingTypeConverter)).

    Source

    with_converter_factory

    fn with_converter_factory(self: &Self, factory: &dyn Fn() -> Rc<dyn IBindingTypeConverter>) -> &dyn IReactiveUIBuilder
    

    Registers the converter that factory creates (WithConverter(Func<IBindingTypeConverter>)).

    Source

    with_fallback_converter

    fn with_fallback_converter(self: &Self, converter: Rc<dyn IBindingFallbackConverter>) -> &dyn IReactiveUIBuilder
    

    Registers a fallback converter (WithFallbackConverter(IBindingFallbackConverter)).

    Source

    with_fallback_converter_factory

    fn with_fallback_converter_factory(self: &Self, factory: &dyn Fn() -> Rc<dyn IBindingFallbackConverter>) -> &dyn IReactiveUIBuilder
    

    Registers the fallback converter that factory creates (WithFallbackConverter(Func<IBindingFallbackConverter>)).

    Source

    with_set_method_converter

    fn with_set_method_converter(self: &Self, converter: Rc<dyn ISetMethodBindingConverter>) -> &dyn IReactiveUIBuilder
    

    Registers a set-method converter (WithSetMethodConverter(ISetMethodBindingConverter)).

    Source

    with_set_method_converter_factory

    fn with_set_method_converter_factory(self: &Self, factory: &dyn Fn() -> Rc<dyn ISetMethodBindingConverter>) -> &dyn IReactiveUIBuilder
    

    Registers the set-method converter that factory creates (WithSetMethodConverter(Func<ISetMethodBindingConverter>)).

    Source

    with_converters_from

    fn with_converters_from(self: &Self, resolver: &dyn IReadonlyDependencyResolver) -> &dyn IReactiveUIBuilder
    

    Registers the converters of the three kinds that resolver has (WithConvertersFrom(IReadonlyDependencyResolver)).

    Source

    using_splat_module

    fn using_splat_module(self: &Self, registration_module: Rc<dyn IModule>) -> &dyn IReactiveUIBuilder
    

    Adds a Splat module (UsingSplatModule<T>(T)).

    Source

    using_splat_builder

    fn using_splat_builder(self: &Self, app_builder: Option<&dyn Fn(&dyn IAppBuilder) -> ()>) -> &dyn IReactiveUIBuilder
    

    Calls app_builder, if any, with the builder as a Splat builder (UsingSplatBuilder(Action<IAppBuilder>)).

    Source

    build_app

    fn build_app(self: &Self) -> &dyn IReactiveUIInstance
    

    Builds the application once, with its core services, and initializes the state of ReactiveUI (Build() and BuildApp()).

    Panics

    When the application has no resolver (InvalidOperationException).

    Source

    Trait implementations

    Availability

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