[][src]Trait interledger_api::NodeStore

pub trait NodeStore: Clone + Send + Sync + 'static {
    type Account: AccountTrait;
    fn insert_account(
        &self,
        account: AccountDetails
    ) -> Box<dyn Future<Item = Self::Account, Error = ()> + Send>;
fn delete_account(
        &self,
        id: <Self::Account as AccountTrait>::AccountId
    ) -> Box<dyn Future<Item = Self::Account, Error = ()> + Send>;
fn update_account(
        &self,
        id: <Self::Account as AccountTrait>::AccountId,
        account: AccountDetails
    ) -> Box<dyn Future<Item = Self::Account, Error = ()> + Send>;
fn modify_account_settings(
        &self,
        id: <Self::Account as AccountTrait>::AccountId,
        settings: AccountSettings
    ) -> Box<dyn Future<Item = Self::Account, Error = ()> + Send>;
fn get_all_accounts(
        &self
    ) -> Box<dyn Future<Item = Vec<Self::Account>, Error = ()> + Send>;
fn set_rates<R>(
        &self,
        rates: R
    ) -> Box<dyn Future<Item = (), Error = ()> + Send>
    where
        R: IntoIterator<Item = (String, f64)>
;
fn set_static_routes<R>(
        &self,
        routes: R
    ) -> Box<dyn Future<Item = (), Error = ()> + Send>
    where
        R: IntoIterator<Item = (String, <Self::Account as AccountTrait>::AccountId)>
;
fn set_static_route(
        &self,
        prefix: String,
        account_id: <Self::Account as AccountTrait>::AccountId
    ) -> Box<dyn Future<Item = (), Error = ()> + Send>; }

Associated Types

Loading content...

Required methods

fn insert_account(
    &self,
    account: AccountDetails
) -> Box<dyn Future<Item = Self::Account, Error = ()> + Send>

fn delete_account(
    &self,
    id: <Self::Account as AccountTrait>::AccountId
) -> Box<dyn Future<Item = Self::Account, Error = ()> + Send>

fn update_account(
    &self,
    id: <Self::Account as AccountTrait>::AccountId,
    account: AccountDetails
) -> Box<dyn Future<Item = Self::Account, Error = ()> + Send>

fn modify_account_settings(
    &self,
    id: <Self::Account as AccountTrait>::AccountId,
    settings: AccountSettings
) -> Box<dyn Future<Item = Self::Account, Error = ()> + Send>

fn get_all_accounts(
    &self
) -> Box<dyn Future<Item = Vec<Self::Account>, Error = ()> + Send>

fn set_rates<R>(
    &self,
    rates: R
) -> Box<dyn Future<Item = (), Error = ()> + Send> where
    R: IntoIterator<Item = (String, f64)>, 

fn set_static_routes<R>(
    &self,
    routes: R
) -> Box<dyn Future<Item = (), Error = ()> + Send> where
    R: IntoIterator<Item = (String, <Self::Account as AccountTrait>::AccountId)>, 

fn set_static_route(
    &self,
    prefix: String,
    account_id: <Self::Account as AccountTrait>::AccountId
) -> Box<dyn Future<Item = (), Error = ()> + Send>

Loading content...

Implementors

Loading content...