pub struct SimPaymentAdapter;Expand description
Deterministic no-broadcast payment adapter.
Implementations§
Trait Implementations§
Source§impl Clone for SimPaymentAdapter
impl Clone for SimPaymentAdapter
Source§fn clone(&self) -> SimPaymentAdapter
fn clone(&self) -> SimPaymentAdapter
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 SimPaymentAdapter
impl Debug for SimPaymentAdapter
Source§impl Default for SimPaymentAdapter
impl Default for SimPaymentAdapter
Source§fn default() -> SimPaymentAdapter
fn default() -> SimPaymentAdapter
Returns the “default value” for a type. Read more
Source§impl PaymentAdapter for SimPaymentAdapter
impl PaymentAdapter for SimPaymentAdapter
Authorize or prepay up to
amount_units before the tool executes. Read moreSource§fn capture(
&self,
authorization_id: &str,
_amount_units: u64,
_currency: &str,
_reference: &str,
) -> Result<PaymentResult, PaymentError>
fn capture( &self, authorization_id: &str, _amount_units: u64, _currency: &str, _reference: &str, ) -> Result<PaymentResult, PaymentError>
Finalize payment for the actual cost after tool execution. Read more
Source§fn release(
&self,
authorization_id: &str,
_reference: &str,
) -> Result<PaymentResult, PaymentError>
fn release( &self, authorization_id: &str, _reference: &str, ) -> Result<PaymentResult, PaymentError>
Release an unused authorization hold. Read more
Source§fn refund(
&self,
transaction_id: &str,
_amount_units: u64,
_currency: &str,
_reference: &str,
) -> Result<PaymentResult, PaymentError>
fn refund( &self, transaction_id: &str, _amount_units: u64, _currency: &str, _reference: &str, ) -> Result<PaymentResult, PaymentError>
Refund a previously executed payment.
fn rail_id(&self) -> &'static str
fn rail_mode(&self) -> Option<PaymentRailMode>
Source§fn settlement_state(
&self,
reference: &str,
authorization_id: Option<&str>,
) -> Result<RailSettlementState, PaymentError>
fn settlement_state( &self, reference: &str, authorization_id: Option<&str>, ) -> Result<RailSettlementState, PaymentError>
Return the side-effect-free rail state for a durable reference. Read more
Auto Trait Implementations§
impl Freeze for SimPaymentAdapter
impl RefUnwindSafe for SimPaymentAdapter
impl Send for SimPaymentAdapter
impl Sync for SimPaymentAdapter
impl Unpin for SimPaymentAdapter
impl UnsafeUnpin for SimPaymentAdapter
impl UnwindSafe for SimPaymentAdapter
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more