pub enum ResponseError {
WellKnown(WellKnownError),
Validation(ValidationError),
Unrecognized {
error_code: String,
message: String,
},
}Available on crate feature
_core only.Expand description
Represent an error returned by Payjoin receiver.
Variants§
WellKnown(WellKnownError)
WellKnown Errors are defined in the BIP78::ReceiverWellKnownError spec.
It is safe to display WellKnown errors to end users.
Validation(ValidationError)
Errors caused by malformed responses.
Unrecognized
Unrecognized Errors are NOT defined in the BIP78::ReceiverWellKnownError spec.
It is NOT safe to display Unrecognized errors to end users as they could be used
maliciously to phish a non technical user. Only display them in debug logs.
Trait Implementations§
Source§impl Debug for ResponseError
impl Debug for ResponseError
Source§impl Display for ResponseError
impl Display for ResponseError
Source§impl Error for ResponseError
impl Error for ResponseError
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<WellKnownError> for ResponseError
impl From<WellKnownError> for ResponseError
Source§fn from(value: WellKnownError) -> Self
fn from(value: WellKnownError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ResponseError
impl !RefUnwindSafe for ResponseError
impl Send for ResponseError
impl Sync for ResponseError
impl Unpin for ResponseError
impl !UnwindSafe for ResponseError
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> 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.