pub struct PaymentRequest {
pub amount: Option<Amount>,
pub label: Option<String>,
pub message: Option<String>,
pub options: Vec<AvailablePaymentMethod>,
}Expand description
The result of parsing a payment string.
Contains optional BIP 321 metadata (amount, label, message) and
one or more AvailablePaymentMethod the caller can present to the user.
When parsed from a bare string (not a BIP 321 URI), label and message
are None and methods contains a single entry.
Fields§
§amount: Option<Amount>§label: Option<String>§message: Option<String>§options: Vec<AvailablePaymentMethod>Trait Implementations§
Source§impl Clone for PaymentRequest
impl Clone for PaymentRequest
Source§fn clone(&self) -> PaymentRequest
fn clone(&self) -> PaymentRequest
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 PaymentRequest
impl Debug for PaymentRequest
Source§impl From<AvailablePaymentMethod> for PaymentRequest
impl From<AvailablePaymentMethod> for PaymentRequest
Source§fn from(option: AvailablePaymentMethod) -> Self
fn from(option: AvailablePaymentMethod) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PaymentRequest
impl PartialEq for PaymentRequest
Source§fn eq(&self, other: &PaymentRequest) -> bool
fn eq(&self, other: &PaymentRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PaymentRequest
impl StructuralPartialEq for PaymentRequest
Auto Trait Implementations§
impl Freeze for PaymentRequest
impl RefUnwindSafe for PaymentRequest
impl Send for PaymentRequest
impl Sync for PaymentRequest
impl Unpin for PaymentRequest
impl UnsafeUnpin for PaymentRequest
impl UnwindSafe for PaymentRequest
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request