pub trait StructResponseExt: Sized {
// Required methods
fn into_response(self) -> HttpResponse;
fn respond_code<C: ResponseCodeContract>(
self,
code: C,
msg: &str,
) -> HttpResult;
fn respond_msg(self, msg: &str) -> HttpResult;
fn respond(self) -> HttpResult;
fn respond_undecorated(self) -> HttpResult;
fn respond_undecorated_code(
self,
code: impl ResponseCodeContract,
) -> HttpResult;
}Required Methods§
fn into_response(self) -> HttpResponse
fn respond_code<C: ResponseCodeContract>(self, code: C, msg: &str) -> HttpResult
fn respond_msg(self, msg: &str) -> HttpResult
fn respond(self) -> HttpResult
fn respond_undecorated(self) -> HttpResult
fn respond_undecorated_code(self, code: impl ResponseCodeContract) -> HttpResult
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.