pub struct JmapError {
pub error_type: String,
pub status: Option<u16>,
pub detail: Option<String>,
pub limit: Option<String>,
}Expand description
JMAP error response
Fields§
§error_type: String§status: Option<u16>§detail: Option<String>§limit: Option<String>Implementations§
Source§impl JmapError
impl JmapError
Sourcepub fn new(error_type: JmapErrorType) -> Self
pub fn new(error_type: JmapErrorType) -> Self
Create a new JMAP error
Sourcepub fn with_status(self, status: u16) -> Self
pub fn with_status(self, status: u16) -> Self
Set the status code
Sourcepub fn with_detail(self, detail: impl Into<String>) -> Self
pub fn with_detail(self, detail: impl Into<String>) -> Self
Set the detail message
Sourcepub fn with_limit(self, limit: impl Into<String>) -> Self
pub fn with_limit(self, limit: impl Into<String>) -> Self
Set the limit information
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JmapError
impl RefUnwindSafe for JmapError
impl Send for JmapError
impl Sync for JmapError
impl Unpin for JmapError
impl UnsafeUnpin for JmapError
impl UnwindSafe for JmapError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more