Struct yew_state::service::ServiceBridge[][src]

pub struct ServiceBridge<H, SCOPE = H> where
    H: StateHandler + 'static,
    SCOPE: 'static, 
{ /* fields omitted */ }

A bridge to a StateService. This allows message passing with state handlers, as well as their parent service. Useful when you want to access the events emitted by StateService.

Implementations

impl<H, SCOPE> ServiceBridge<H, SCOPE> where
    H: StateHandler + 'static, 
[src]

pub fn new(callback: Callback<ServiceOutput<H>>) -> Self[src]

Create a new bridge, automatically subscribing.

pub fn send_service(&mut self, msg: ServiceRequest<H>)[src]

Send message to service.

pub fn send_handler(&mut self, msg: H::Input)[src]

Send message to handler.

Auto Trait Implementations

impl<H, SCOPE = H> !RefUnwindSafe for ServiceBridge<H, SCOPE>

impl<H, SCOPE = H> !Send for ServiceBridge<H, SCOPE>

impl<H, SCOPE = H> !Sync for ServiceBridge<H, SCOPE>

impl<H, SCOPE> Unpin for ServiceBridge<H, SCOPE>

impl<H, SCOPE = H> !UnwindSafe for ServiceBridge<H, SCOPE>

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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, 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.