pub enum AnyBank {
Dkb(Dkb),
Generic(GenericBank),
}Expand description
Enum dispatch for bank implementations — zero-cost, no dynamic dispatch.
New banks are added here as enum variants. This avoids Box<dyn BankOps>
which is incompatible with native async fn in traits.
Variants§
Dkb(Dkb)
Generic(GenericBank)
Implementations§
Source§impl AnyBank
impl AnyBank
pub fn config(&self) -> &BankConfig
pub async fn initiate( &self, username: &UserId, pin: &Pin, product_id: &ProductId, system_id: Option<&SystemId>, target_iban: Option<&Iban>, target_bic: Option<&Bic>, ) -> Result<InitiateOutcome>
pub async fn fetch( &self, dialog: &mut Dialog<Open>, account: &Account, days: u32, ) -> Result<FetchResult>
pub async fn fetch_holdings( &self, dialog: &mut Dialog<Open>, account: &Account, ) -> Result<Vec<SecurityHolding>>
Sourcepub async fn fetch_with_opts(
&self,
dialog: &mut Dialog<Open>,
account: &Account,
opts: &FetchOpts,
) -> Result<FetchResult>
pub async fn fetch_with_opts( &self, dialog: &mut Dialog<Open>, account: &Account, opts: &FetchOpts, ) -> Result<FetchResult>
Fetch data with fine-grained control via FetchOpts.
This gives callers a single authenticated dialog for all operations.
Auto Trait Implementations§
impl Freeze for AnyBank
impl RefUnwindSafe for AnyBank
impl Send for AnyBank
impl Sync for AnyBank
impl Unpin for AnyBank
impl UnsafeUnpin for AnyBank
impl UnwindSafe for AnyBank
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