Trait blaze_pk::packet::IntoResponse
source · 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§
sourcefn into_response(self, req: &Packet) -> Packet
fn into_response(self, req: &Packet) -> Packet
Into packet conversion
Implementations on Foreign Types§
source§impl IntoResponse for ()
impl IntoResponse for ()
Empty response implementation for unit types to allow functions to have no return type
fn into_response(self, req: &Packet) -> Packet
source§impl<S> IntoResponse for Option<S>where
S: IntoResponse,
impl<S> IntoResponse for Option<S>where S: IntoResponse,
Into response implementation for option type turning None responses into an empty response
fn into_response(self, req: &Packet) -> Packet
source§impl<S, E> IntoResponse for Result<S, E>where
S: IntoResponse,
E: IntoResponse,
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
fn into_response(self, req: &Packet) -> Packet
Implementors§
impl IntoResponse for PacketBody
impl IntoResponse for Response
impl<E> IntoResponse for Ewhere E: Encodable + 'static,
Into response imeplementation for encodable responses which just calls res.respond