pub struct WebError { /* private fields */ }Implementations§
Source§impl WebError
impl WebError
pub fn message(message: impl Into<String>) -> Self
pub fn parameter( message: impl Into<String>, source: impl Display + Send + Sync + 'static, ) -> Self
pub fn return_conversion( message: impl Into<String>, source: impl Display + Send + Sync + 'static, ) -> Self
pub fn not_found(message: impl Into<String>) -> Self
pub fn forbidden(message: impl Into<String>) -> Self
pub fn internal( message: impl Into<String>, source: impl Display + Send + Sync + 'static, ) -> Self
pub fn panic(message: impl Into<String>) -> Self
pub fn kind(&self) -> &WebErrorKind
pub fn status(&self) -> u16
pub fn public_message(&self) -> &str
pub fn log(error: &Self, request: Option<&WebRequest>)
pub fn log_request(error: &Self, trace_id: &str, method: &str, path: &str)
pub fn with_source( kind: WebErrorKind, message: impl Into<String>, source: impl Display + Send + Sync + 'static, ) -> Self
Trait Implementations§
Source§impl Error for WebError
impl Error for WebError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for WebError
impl RefUnwindSafe for WebError
impl Send for WebError
impl Sync for WebError
impl Unpin for WebError
impl UnsafeUnpin for WebError
impl UnwindSafe for WebError
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