pub struct PaymentProblem { /* private fields */ }Expand description
A structured payment-problem record returned through wire boundaries.
Not itself serialisable — it is an internal, strongly-typed bridge between
Rust errors and crate::wire::VerifyResponse::Invalid /
crate::wire::SettleResponse::Failure on the wire.
Implementations§
Source§impl PaymentProblem
impl PaymentProblem
Sourcepub const fn new(reason: ErrorReason, details: String) -> Self
pub const fn new(reason: ErrorReason, details: String) -> Self
Creates a new problem record.
Sourcepub fn reason(&self) -> ErrorReason
pub fn reason(&self) -> ErrorReason
Returns the wire-level reason code (clones the inner string for the
Custom variant; cheap for unit variants).
Sourcepub const fn reason_ref(&self) -> &ErrorReason
pub const fn reason_ref(&self) -> &ErrorReason
Returns a borrowed reference to the wire-level reason code.
Trait Implementations§
Source§impl Clone for PaymentProblem
impl Clone for PaymentProblem
Source§fn clone(&self) -> PaymentProblem
fn clone(&self) -> PaymentProblem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PaymentProblem
impl Debug for PaymentProblem
impl Eq for PaymentProblem
Source§impl PartialEq for PaymentProblem
impl PartialEq for PaymentProblem
impl StructuralPartialEq for PaymentProblem
Auto Trait Implementations§
impl Freeze for PaymentProblem
impl RefUnwindSafe for PaymentProblem
impl Send for PaymentProblem
impl Sync for PaymentProblem
impl Unpin for PaymentProblem
impl UnsafeUnpin for PaymentProblem
impl UnwindSafe for PaymentProblem
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.