pub struct X402PaymentAdapter { /* private fields */ }Expand description
Thin prepaid HTTP payment bridge for x402-style per-request settlement.
The adapter intentionally stays narrow: it only performs one remote authorization request and treats later capture/release/refund actions as prepaid bookkeeping. This keeps the bridge small while still giving the kernel a real external authorization hop before execution.
Implementations§
Trait Implementations§
Source§impl Clone for X402PaymentAdapter
impl Clone for X402PaymentAdapter
Source§fn clone(&self) -> X402PaymentAdapter
fn clone(&self) -> X402PaymentAdapter
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 X402PaymentAdapter
impl Debug for X402PaymentAdapter
Source§impl PaymentAdapter for X402PaymentAdapter
impl PaymentAdapter for X402PaymentAdapter
Authorize or prepay up to
amount_units before the tool executes.Source§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.
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.
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.
Auto Trait Implementations§
impl Freeze for X402PaymentAdapter
impl !RefUnwindSafe for X402PaymentAdapter
impl Send for X402PaymentAdapter
impl Sync for X402PaymentAdapter
impl Unpin for X402PaymentAdapter
impl UnsafeUnpin for X402PaymentAdapter
impl !UnwindSafe for X402PaymentAdapter
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