Struct yew_state::service::ServiceBridge [−][src]
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]
H: StateHandler + 'static,
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]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,