FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IMessageBusExt

    trait · ferroui-reactiveui · v0.5.0

    trait IMessageBusExt
    

    The typed operations of a message bus (the generic methods of IMessageBus), on its shared handle: Rc<MessageBus> and Rc<dyn IMessageBus> have them.

    The type of the message is a type parameter; a message type has a default value, which listen_include_latest gives before any message was sent (upstream's default(T)). A contract of None is upstream's null.

    View source

    Members

    register_scheduler

    fn register_scheduler<T: 'static>(self: &Self, scheduler: Rc<dyn IScheduler>)
    

    Registers the scheduler that delivers the messages of T without a contract, replacing the one registered before (RegisterScheduler<T>(IScheduler)).

    Source

    register_scheduler_with_contract

    fn register_scheduler_with_contract<T: 'static>(self: &Self, scheduler: Rc<dyn IScheduler>, contract: Option<&str>)
    

    Registers the scheduler that delivers the messages of T with contract (RegisterScheduler<T>(IScheduler, string?)).

    Source

    listen

    fn listen<T: Clone + Default + 'static>(self: &Self) -> Rc<dyn IObservable<T>>
    

    The messages of T sent after the subscription (Listen<T>()). The channel is created when the observable is subscribed.

    Source

    listen_with_contract

    fn listen_with_contract<T: Clone + Default + 'static>(self: &Self, contract: Option<&str>) -> Rc<dyn IObservable<T>>
    

    The messages of T with contract sent after the subscription (Listen<T>(string?)).

    Source

    listen_include_latest

    fn listen_include_latest<T: Clone + Default + 'static>(self: &Self) -> Rc<dyn IObservable<T>>
    

    The latest message of T (or its default value) at once, then the later ones (ListenIncludeLatest<T>()).

    Source

    listen_include_latest_with_contract

    fn listen_include_latest_with_contract<T: Clone + Default + 'static>(self: &Self, contract: Option<&str>) -> Rc<dyn IObservable<T>>
    

    The latest message of T with contract, then the later ones (ListenIncludeLatest<T>(string?)).

    Source

    register_message_source

    fn register_message_source<T: Clone + Default + 'static>(self: &Self, source: Rc<dyn IObservable<T>>) -> Rc<dyn IDisposable>
    

    Sends each value of source as a message of T, until the returned disposable is disposed; an error or the end of source is logged and leaves the channel open (RegisterMessageSource<T>(IObservable<T>)).

    Source

    register_message_source_with_contract

    fn register_message_source_with_contract<T: Clone + Default + 'static>(self: &Self, source: Rc<dyn IObservable<T>>, contract: Option<&str>) -> Rc<dyn IDisposable>
    

    register_message_source on the channel of contract (RegisterMessageSource<T>(IObservable<T>, string?)).

    Source

    send_message

    fn send_message<T: Clone + Default + 'static>(self: &Self, message: T)
    

    Sends one message of T (SendMessage<T>(T)). For messages that answer other changes, register_message_source is the better fit.

    Source

    send_message_with_contract

    fn send_message_with_contract<T: Clone + Default + 'static>(self: &Self, message: T, contract: Option<&str>)
    

    Sends one message of T on the channel of contract (SendMessage<T>(T, string?)).

    Source

    Trait implementations

    Availability

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