pub struct Hub { /* private fields */ }Expand description
The host’s jobs and the page’s event stream.
Implementations§
Source§impl Hub
impl Hub
Sourcepub fn waiting(&self) -> Option<Value>
pub fn waiting(&self) -> Option<Value>
What waits for the person now (an ask or question event).
Sourcepub fn answer(&self, id: u64, reply: Reply) -> Result<(), String>
pub fn answer(&self, id: u64, reply: Reply) -> Result<(), String>
Answers what waits; Err when nothing does, or something else does.
Sourcepub fn stop(&self)
pub fn stop(&self)
Asks the running job to stop before its next task; a call waiting for the person is answered with “stop” (it keeps waiting, resumably).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Hub
impl RefUnwindSafe for Hub
impl Send for Hub
impl Sync for Hub
impl Unpin for Hub
impl UnsafeUnpin for Hub
impl UnwindSafe for Hub
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