pub enum HandlerResponse {
Sync(Result<Vec<u8>, Error>),
Async(Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send>>),
}Expand description
Variants§
Sync(Result<Vec<u8>, Error>)
Synchronous result, available immediately.
Async(Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send>>)
Asynchronous result — a pinned future that resolves to the response.
Auto Trait Implementations§
impl Freeze for HandlerResponse
impl !RefUnwindSafe for HandlerResponse
impl Send for HandlerResponse
impl !Sync for HandlerResponse
impl Unpin for HandlerResponse
impl UnsafeUnpin for HandlerResponse
impl !UnwindSafe for HandlerResponse
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