pub enum DispatchOutcome {
OneShot(Result<Value, WireError>),
Stream(Box<dyn EventStream + Send>),
}Expand description
What dispatch returns. One-shot verbs (ping, stats, …)
produce a single result/error frame; streaming verbs
(tail_flow) produce a sequence of Event frames terminated
by an End frame.
Variants§
OneShot(Result<Value, WireError>)
One-shot reply: a single JSON value or a structured error.
Stream(Box<dyn EventStream + Send>)
Streaming reply: each call to next_event yields the next
Event payload, or None to terminate with an End frame.
Auto Trait Implementations§
impl Freeze for DispatchOutcome
impl !RefUnwindSafe for DispatchOutcome
impl Send for DispatchOutcome
impl !Sync for DispatchOutcome
impl Unpin for DispatchOutcome
impl UnsafeUnpin for DispatchOutcome
impl !UnwindSafe for DispatchOutcome
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