#[non_exhaustive]pub struct SchemePaymentRequiredContext<'a> {
pub requirements: &'a [PaymentRequirements],
pub payment_payload: Option<&'a WirePaymentPayload>,
pub resource: &'a ResourceInfo,
pub error: Option<&'a str>,
pub payment_required_response: &'a PaymentRequired,
pub supported: &'a SupportedResponse,
pub network: &'a ChainId,
}Expand description
Context for scheme 402 enrichment.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.requirements: &'a [PaymentRequirements]Accepts being enriched.
payment_payload: Option<&'a WirePaymentPayload>Client payload when enriching a paid 402 retry.
resource: &'a ResourceInfoResource metadata from the 402.
error: Option<&'a str>Optional 402 error string.
payment_required_response: &'a PaymentRequiredWorking payment-required response.
supported: &'a SupportedResponseFacilitator GET /supported snapshot.
network: &'a ChainIdCAIP-2 of the accept this enrich invocation is bound to.
Implementations§
Source§impl<'a> SchemePaymentRequiredContext<'a>
impl<'a> SchemePaymentRequiredContext<'a>
Sourcepub const fn new(
requirements: &'a [PaymentRequirements],
resource: &'a ResourceInfo,
payment_required_response: &'a PaymentRequired,
supported: &'a SupportedResponse,
network: &'a ChainId,
) -> Self
pub const fn new( requirements: &'a [PaymentRequirements], resource: &'a ResourceInfo, payment_required_response: &'a PaymentRequired, supported: &'a SupportedResponse, network: &'a ChainId, ) -> Self
Constructs a 402 enrich context.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SchemePaymentRequiredContext<'a>
impl<'a> RefUnwindSafe for SchemePaymentRequiredContext<'a>
impl<'a> Send for SchemePaymentRequiredContext<'a>
impl<'a> Sync for SchemePaymentRequiredContext<'a>
impl<'a> Unpin for SchemePaymentRequiredContext<'a>
impl<'a> UnsafeUnpin for SchemePaymentRequiredContext<'a>
impl<'a> UnwindSafe for SchemePaymentRequiredContext<'a>
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