pub struct PaymentReference(/* private fields */);Expand description
A non-empty payment reference.
Implementations§
Source§impl PaymentReference
impl PaymentReference
Sourcepub fn new(value: impl AsRef<str>) -> Result<PaymentReference, PaymentError>
pub fn new(value: impl AsRef<str>) -> Result<PaymentReference, PaymentError>
Creates a payment reference from non-empty text.
§Errors
Returns PaymentError::EmptyReference when the trimmed input is empty.
Trait Implementations§
Source§impl Clone for PaymentReference
impl Clone for PaymentReference
Source§fn clone(&self) -> PaymentReference
fn clone(&self) -> PaymentReference
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 PaymentReference
impl Debug for PaymentReference
Source§impl Display for PaymentReference
impl Display for PaymentReference
Source§impl FromStr for PaymentReference
impl FromStr for PaymentReference
Source§type Err = PaymentError
type Err = PaymentError
The associated error which can be returned from parsing.
Source§fn from_str(
value: &str,
) -> Result<PaymentReference, <PaymentReference as FromStr>::Err>
fn from_str( value: &str, ) -> Result<PaymentReference, <PaymentReference as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for PaymentReference
impl Hash for PaymentReference
Source§impl Ord for PaymentReference
impl Ord for PaymentReference
Source§fn cmp(&self, other: &PaymentReference) -> Ordering
fn cmp(&self, other: &PaymentReference) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PaymentReference
impl PartialEq for PaymentReference
Source§impl PartialOrd for PaymentReference
impl PartialOrd for PaymentReference
impl Eq for PaymentReference
impl StructuralPartialEq for PaymentReference
Auto Trait Implementations§
impl Freeze for PaymentReference
impl RefUnwindSafe for PaymentReference
impl Send for PaymentReference
impl Sync for PaymentReference
impl Unpin for PaymentReference
impl UnsafeUnpin for PaymentReference
impl UnwindSafe for PaymentReference
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