pub enum HandlerOutcome {
Response(Vec<u8>),
Error {
code: String,
message: String,
},
Streamed,
}Expand description
The terminal result of a module request handler.
Variants§
Response(Vec<u8>)
Send a Response frame carrying these bytes.
Error
Send an Error frame carrying an ErrorBody with this code and message.
Streamed
The handler emitted stream data with RequestCtx::emit; the serve code
sends the StreamEnd terminal frame.
Trait Implementations§
Source§impl Clone for HandlerOutcome
impl Clone for HandlerOutcome
Source§fn clone(&self) -> HandlerOutcome
fn clone(&self) -> HandlerOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HandlerOutcome
impl Debug for HandlerOutcome
impl Eq for HandlerOutcome
Source§impl PartialEq for HandlerOutcome
impl PartialEq for HandlerOutcome
impl StructuralPartialEq for HandlerOutcome
Auto Trait Implementations§
impl Freeze for HandlerOutcome
impl RefUnwindSafe for HandlerOutcome
impl Send for HandlerOutcome
impl Sync for HandlerOutcome
impl Unpin for HandlerOutcome
impl UnsafeUnpin for HandlerOutcome
impl UnwindSafe for HandlerOutcome
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