pub struct Refusal {
pub status: u16,
pub code: &'static str,
pub message: String,
pub retry_after_ms: Option<u64>,
}Fields§
§status: u16§code: &'static str§message: String§retry_after_ms: Option<u64>Implementations§
Source§impl Refusal
impl Refusal
pub fn bad_request(message: impl Into<String>) -> Self
pub fn forbidden(message: impl Into<String>) -> Self
pub fn not_found(message: impl Into<String>) -> Self
pub fn conflict(code: &'static str, message: impl Into<String>) -> Self
pub fn unsupported(service: &str, method: &str) -> Self
pub fn to_json(&self) -> Value
Trait Implementations§
impl Eq for Refusal
impl StructuralPartialEq for Refusal
Auto Trait Implementations§
impl Forget for Refusal
impl Freeze for Refusal
impl Move for Refusal
impl RefUnwindSafe for Refusal
impl Send for Refusal
impl Sync for Refusalwhere
RawVecInner: Sync,
impl Unpin for Refusal
impl UnsafeUnpin for Refusal
impl UnwindSafe for Refusal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more