MakeAxumResponse

Trait MakeAxumResponse 

Source
pub trait MakeAxumResponse<T, E, R> {
    // Required method
    fn make_axum_response(self, result: Result<T, E>) -> Result<Response, E>;
}
Expand description

A trait for converting the result of the Server Function into an Axum response.

This is to work around the issue where we want to return both Deserialize types and FromResponse types. Stuff like websockets

We currently have an Input type even though it’s not useful since we might want to support regular axum endpoints later. For now, it’s just Result<T, E> where T is either DeserializeOwned or FromResponse

Required Methods§

Source

fn make_axum_response(self, result: Result<T, E>) -> Result<Response, E>

Implementors§