pub trait ResponseCodeContract: Clone {
// Required methods
fn code(&self) -> Cow<'static, str>;
fn status(&self) -> StatusCode;
fn from_code(code: &str) -> Self;
fn from_status(status: StatusCode) -> Self;
// Provided method
fn success(&self) -> bool { ... }
}Required Methods§
fn code(&self) -> Cow<'static, str>
fn status(&self) -> StatusCode
fn from_code(code: &str) -> Self
fn from_status(status: StatusCode) -> Self
Provided Methods§
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.