pub struct FailedToOpenSecretBox { /* private fields */ }Expand description
Error : FailedToOpenSecretBox (Kind: ValidationError)
Implementations§
Source§impl FailedToOpenSecretBox
impl FailedToOpenSecretBox
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new Error instance.
§Arguments
code- A numerical status or error code (e.g., HTTP status code).class- A string representing the error category or type (e.g., “ValidationError”).message- A human-readable error message.details- Additional error details stored in a key-value map, usingserde_value::Value.
§Returns
A new instance of Error.
Sourcepub fn with_message(self, message: String) -> Self
pub fn with_message(self, message: String) -> Self
Adds a custom message to the error.
Sourcepub fn with_details(self, details: BTreeMap<String, Value>) -> Self
pub fn with_details(self, details: BTreeMap<String, Value>) -> Self
Adds a structured map of additional error details.
Trait Implementations§
Source§impl Clone for FailedToOpenSecretBox
impl Clone for FailedToOpenSecretBox
Source§fn clone(&self) -> FailedToOpenSecretBox
fn clone(&self) -> FailedToOpenSecretBox
Returns a duplicate 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 FailedToOpenSecretBox
impl Debug for FailedToOpenSecretBox
Source§impl Display for FailedToOpenSecretBox
impl Display for FailedToOpenSecretBox
Source§impl Error for FailedToOpenSecretBox
impl Error for FailedToOpenSecretBox
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 From<FailedToOpenSecretBox> for Error
impl From<FailedToOpenSecretBox> for Error
Source§fn from(err: FailedToOpenSecretBox) -> Error
fn from(err: FailedToOpenSecretBox) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FailedToOpenSecretBox
impl RefUnwindSafe for FailedToOpenSecretBox
impl Send for FailedToOpenSecretBox
impl Sync for FailedToOpenSecretBox
impl Unpin for FailedToOpenSecretBox
impl UnwindSafe for FailedToOpenSecretBox
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