pub struct HashRoutingError {
pub error: Errors,
}
Expand description
Represents an error that can occur during the hash routing process.
This structure is used to encapsulate errors in a way that they can be easily identified and handled.
It contains a single field, error
, which is a String
describing the error that occurred.
§Examples
Basic usage:
let error = HashRoutingError { error: "Trade hash not found".to_string() };
println!("{}", error);
Fields§
§error: Errors
A human-readable description of the error.
Trait Implementations§
Source§impl Clone for HashRoutingError
impl Clone for HashRoutingError
Source§fn clone(&self) -> HashRoutingError
fn clone(&self) -> HashRoutingError
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 HashRoutingError
impl Debug for HashRoutingError
Source§impl Display for HashRoutingError
Implements the Display
trait for HashRoutingError
.
impl Display for HashRoutingError
Implements the Display
trait for HashRoutingError
.
This implementation is used to format the error message for display purposes.
§Notes
- We use
{:?}
to print the error enum as a string. and avoid the collision of the EnumErrors
not having thefmt::Display
implementation - If
stdout
isn’t propagated to some error logging client, then these errors will only be visible in the CLI when in development mode.
Auto Trait Implementations§
impl Freeze for HashRoutingError
impl RefUnwindSafe for HashRoutingError
impl Send for HashRoutingError
impl Sync for HashRoutingError
impl Unpin for HashRoutingError
impl UnwindSafe for HashRoutingError
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.