Struct nanoservices_utils::errors::NanoServiceError
source · pub struct NanoServiceError {
pub message: String,
pub status: NanoServiceErrorStatus,
}
Expand description
The custom error that Actix web automatically converts to a HTTP response.
§Fields
message
- The message of the error.status
- The status of the error.
Fields§
§message: String
§status: NanoServiceErrorStatus
Implementations§
source§impl NanoServiceError
impl NanoServiceError
sourcepub fn new(message: String, status: NanoServiceErrorStatus) -> NanoServiceError
pub fn new(message: String, status: NanoServiceErrorStatus) -> NanoServiceError
Trait Implementations§
source§impl Clone for NanoServiceError
impl Clone for NanoServiceError
source§fn clone(&self) -> NanoServiceError
fn clone(&self) -> NanoServiceError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NanoServiceError
impl Debug for NanoServiceError
source§impl<'de> Deserialize<'de> for NanoServiceError
impl<'de> Deserialize<'de> for NanoServiceError
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for NanoServiceError
impl Display for NanoServiceError
source§impl Error for NanoServiceError
impl Error for NanoServiceError
1.30.0 · 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()
source§impl PartialEq for NanoServiceError
impl PartialEq for NanoServiceError
source§impl Revisioned for NanoServiceError
impl Revisioned for NanoServiceError
source§impl Serialize for NanoServiceError
impl Serialize for NanoServiceError
impl<'__de> Decode<'__de> for NanoServiceErrorwhere
'__de:,
impl Encode for NanoServiceError
impl StructuralPartialEq for NanoServiceError
Auto Trait Implementations§
impl Freeze for NanoServiceError
impl RefUnwindSafe for NanoServiceError
impl Send for NanoServiceError
impl Sync for NanoServiceError
impl Unpin for NanoServiceError
impl UnwindSafe for NanoServiceError
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)