Struct iced_web::Bus[][src]

pub struct Bus<Message> { /* fields omitted */ }

A publisher of messages.

It can be used to route messages back to the Application.

Implementations

impl<Message> Bus<Message> where
    Message: 'static, 
[src]

pub fn publish(&self, message: Message)[src]

Publishes a new message for the Application.

pub fn map<B>(&self, mapper: Rc<Box<dyn Fn(B) -> Message>>) -> Bus<B> where
    B: 'static, 
[src]

Creates a new Bus that applies the given function to the messages before publishing.

Trait Implementations

impl<Message> Clone for Bus<Message>[src]

Auto Trait Implementations

impl<Message> !RefUnwindSafe for Bus<Message>

impl<Message> !Send for Bus<Message>

impl<Message> !Sync for Bus<Message>

impl<Message> Unpin for Bus<Message>

impl<Message> !UnwindSafe for Bus<Message>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.