Struct conjure_error::SerializableError
source · [−]pub struct SerializableError { /* private fields */ }Expand description
The JSON-serializable representation of an error.
Implementations
sourceimpl SerializableError
impl SerializableError
sourcepub fn error_code(&self) -> &ErrorCode
pub fn error_code(&self) -> &ErrorCode
The broad category of the error.
When transmitted over HTTP, this determines the response’s status code.
sourcepub fn error_name(&self) -> &str
pub fn error_name(&self) -> &str
The error’s name.
The name is made up of a namespace and more specific error name, separated by a :.
sourcepub fn error_instance_id(&self) -> Uuid
pub fn error_instance_id(&self) -> Uuid
A unique identifier for this error instance.
This can be used to correlate reporting about the error as it transfers between components of a distributed system.
sourcepub fn parameters(&self) -> &BTreeMap<String, String>
pub fn parameters(&self) -> &BTreeMap<String, String>
Parameters providing more information about the error.
Trait Implementations
sourceimpl Clone for SerializableError
impl Clone for SerializableError
sourcefn clone(&self) -> SerializableError
fn clone(&self) -> SerializableError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for SerializableError
impl Debug for SerializableError
sourceimpl<'de> Deserialize<'de> for SerializableError
impl<'de> Deserialize<'de> for SerializableError
sourcefn deserialize<D>(d: D) -> Result<SerializableError, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<SerializableError, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl ErrorType for SerializableError
impl ErrorType for SerializableError
sourcefn instance_id(&self) -> Option<Uuid>
fn instance_id(&self) -> Option<Uuid>
Returns the error’s instance ID, if it stores one. Read more
sourcefn safe_args(&self) -> &'static [&'static str]
fn safe_args(&self) -> &'static [&'static str]
Returns a sorted slice of the names of the error’s safe parameters.
sourcefn with_instance_id(self, instance_id: Uuid) -> WithInstanceId<Self> where
Self: Sized,
fn with_instance_id(self, instance_id: Uuid) -> WithInstanceId<Self> where
Self: Sized,
Wraps the error in another that overrides its instance ID.
sourceimpl From<SerializableError> for Builder
impl From<SerializableError> for Builder
sourcefn from(_v: SerializableError) -> Builder
fn from(_v: SerializableError) -> Builder
Performs the conversion.
sourceimpl Hash for SerializableError
impl Hash for SerializableError
sourceimpl Ord for SerializableError
impl Ord for SerializableError
sourceimpl PartialEq<SerializableError> for SerializableError
impl PartialEq<SerializableError> for SerializableError
sourcefn eq(&self, other: &SerializableError) -> bool
fn eq(&self, other: &SerializableError) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &SerializableError) -> bool
fn ne(&self, other: &SerializableError) -> bool
This method tests for !=.
sourceimpl PartialOrd<SerializableError> for SerializableError
impl PartialOrd<SerializableError> for SerializableError
sourcefn partial_cmp(&self, other: &SerializableError) -> Option<Ordering>
fn partial_cmp(&self, other: &SerializableError) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl Serialize for SerializableError
impl Serialize for SerializableError
impl Eq for SerializableError
impl StructuralEq for SerializableError
impl StructuralPartialEq for SerializableError
Auto Trait Implementations
impl RefUnwindSafe for SerializableError
impl Send for SerializableError
impl Sync for SerializableError
impl Unpin for SerializableError
impl UnwindSafe for SerializableError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more