pub enum ServiceRequest<H>where
H: StateHandler,{
Apply(Rc<dyn Fn(&mut H::Model)>),
ApplyOnce(Box<dyn FnOnce(&mut H::Model)>),
Subscribe,
}Expand description
Message send to StateService.
Variants§
Apply(Rc<dyn Fn(&mut H::Model)>)
Apply a state change.
ApplyOnce(Box<dyn FnOnce(&mut H::Model)>)
Apply a state change once.
Subscribe
Registers the sender to be notified when state changes.
Trait Implementations§
Source§impl<H> From<ServiceRequest<H>> for ServiceInput<H>where
H: StateHandler,
impl<H> From<ServiceRequest<H>> for ServiceInput<H>where
H: StateHandler,
Source§fn from(msg: ServiceRequest<H>) -> Self
fn from(msg: ServiceRequest<H>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<H> Freeze for ServiceRequest<H>
impl<H> !RefUnwindSafe for ServiceRequest<H>
impl<H> !Send for ServiceRequest<H>
impl<H> !Sync for ServiceRequest<H>
impl<H> Unpin for ServiceRequest<H>
impl<H> !UnwindSafe for ServiceRequest<H>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more