pub struct WalletConfig {
pub app_name: String,
pub app_url: String,
pub apple: Option<AppleConfig>,
pub google: Option<GoogleConfig>,
}Expand description
Top-level wallet configuration.
apple and google are independently optional — a deployment can ship
Apple-only, Google-only, or neither without errors.
Fields§
§app_name: StringApplication name. Defaults to "Ferro Application" when APP_NAME is unset.
app_url: StringApplication URL. Defaults to "http://localhost:8080" when APP_URL is unset.
apple: Option<AppleConfig>Apple Wallet signing cluster, or None if any required Apple env var is missing.
google: Option<GoogleConfig>Google Wallet signing cluster, or None if any required Google env var is missing.
Implementations§
Source§impl WalletConfig
impl WalletConfig
Sourcepub fn from_env() -> Result<Self, WalletError>
pub fn from_env() -> Result<Self, WalletError>
Loads wallet configuration from environment variables.
APP_NAME and APP_URL fall back to the same defaults as
framework::config::AppConfig::from_env: "Ferro Application" and
"http://localhost:8080".
Per D-02 (permissive semantics): missing Apple or Google env vars NEVER
produce an error. Callers gate downstream functionality on
wallet_cfg.apple.is_some() / .google.is_some().
§Errors
Returns Result for forward compatibility — additional non-wallet
validation may be added in future versions. The current implementation
never returns Err.
Trait Implementations§
Source§impl Clone for WalletConfig
impl Clone for WalletConfig
Source§fn clone(&self) -> WalletConfig
fn clone(&self) -> WalletConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for WalletConfig
impl RefUnwindSafe for WalletConfig
impl Send for WalletConfig
impl Sync for WalletConfig
impl Unpin for WalletConfig
impl UnsafeUnpin for WalletConfig
impl UnwindSafe for WalletConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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