pub trait IntoResponse: 'static {
    // Required method
    fn into_response(self, req: &Packet) -> Packet;
}
Expand description

Trait for a type that can be converted into a packet response using the header from the request packet

Required Methods§

source

fn into_response(self, req: &Packet) -> Packet

Into packet conversion

Implementations on Foreign Types§

source§

impl IntoResponse for ()

Empty response implementation for unit types to allow functions to have no return type

source§

impl<S> IntoResponse for Option<S>where S: IntoResponse,

Into response implementation for option type turning None responses into an empty response

source§

impl<S, E> IntoResponse for Result<S, E>where S: IntoResponse, E: IntoResponse,

Into response implementation on result turning whichever portion of the result into a response

Implementors§

source§

impl IntoResponse for PacketBody

source§

impl IntoResponse for Response

source§

impl<E> IntoResponse for Ewhere E: Encodable + 'static,

Into response imeplementation for encodable responses which just calls res.respond