stripe-pay-client 10.2.2

WebAssembly client for the Stripe payment SDK: renders Stripe payment element configuration and forwards it to the server transport.
Documentation
use super::*;

/// The configuration a checkout page hands to the payment element.
///
/// The struct is transport-free on purpose: the browser binds it to
/// Stripe.js at mount time, so every field can be exercised without a
/// DOM and stays unit-testable on the host target.
///
/// Accessors are generated by `#[derive(Data)]`. The client secret is
/// pinned at construction: it authenticates a mount against Stripe, so
/// allowing it to be swapped after the fact would let a caller who
/// already holds the config redirect the element at another intent.
#[derive(Clone, Data, Debug, Eq, PartialEq)]
pub struct ElementConfig {
    /// The client secret Stripe issued for the intent.
    #[set(skip)]
    pub(super) client_secret: String,
    /// Which element variant to render.
    #[get(type(copy))]
    pub(super) kind: ElementKind,
    /// The locale for the element's built-in labels.
    #[set(type(AsRef<str>))]
    pub(super) locale: String,
}