pub struct VerifiedPayment { /* private fields */ }Available on crate feature
server only.Expand description
A verified payment token ready for on-chain settlement.
Produced by Paygate::verify_only after the facilitator confirms the
payment signature is valid. settle consumes self,
preventing double-settlement at the type level.
Implementations§
Source§impl VerifiedPayment
impl VerifiedPayment
Sourcepub async fn settle<F: Facilitator>(
self,
facilitator: &F,
) -> Result<SettleResponse, PaygateError>
pub async fn settle<F: Facilitator>( self, facilitator: &F, ) -> Result<SettleResponse, PaygateError>
Executes on-chain settlement, consuming self to prevent reuse.
§Errors
Returns PaygateError::Settlement if the facilitator rejects the
settlement or if the on-chain transaction fails.
Sourcepub const fn settle_request(&self) -> &SettleRequest
pub const fn settle_request(&self) -> &SettleRequest
Returns a reference to the underlying settle request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VerifiedPayment
impl RefUnwindSafe for VerifiedPayment
impl Send for VerifiedPayment
impl Sync for VerifiedPayment
impl Unpin for VerifiedPayment
impl UnsafeUnpin for VerifiedPayment
impl UnwindSafe for VerifiedPayment
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