pub trait IntoFunctionResponse<B, S> {
    // Required method
    fn into_response(self) -> FunctionResponse<B, S>;
}
Expand description

a trait that can be implemented for any type that can be converted into a FunctionResponse. This allows us to use the into method to convert a type into a FunctionResponse.

Required Methods§

source

fn into_response(self) -> FunctionResponse<B, S>

Convert the type into a FunctionResponse.

Implementors§

source§

impl<B> IntoFunctionResponse<B, Body> for B
where B: Serialize,

source§

impl<B, S> IntoFunctionResponse<B, S> for FunctionResponse<B, S>

source§

impl<S, D, E> IntoFunctionResponse<(), S> for StreamResponse<S>
where S: Stream<Item = Result<D, E>> + Unpin + Send + 'static, D: Into<Bytes> + Send, E: Into<Error> + Send + Debug,