pub struct AppState {
pub financial_state: Arc<RwLock<FinancialState>>,
pub auth_config: Arc<AuthConfig>,
pub facilitator_stats: Arc<FacilitatorStatsCounter>,
pub facilitator_fee_bps: u32,
pub credit_scores: Arc<RwLock<HashMap<String, CreditScore>>>,
pub credit_lines: Arc<RwLock<HashMap<String, CreditLine>>>,
pub trust_contexts: Arc<RwLock<HashMap<String, TrustContext>>>,
pub payment_histories: Arc<RwLock<HashMap<String, PaymentHistory>>>,
}Expand description
Shared application state for the Haima API.
Fields§
§financial_state: Arc<RwLock<FinancialState>>§auth_config: Arc<AuthConfig>§facilitator_stats: Arc<FacilitatorStatsCounter>In-memory facilitator statistics counter.
facilitator_fee_bps: u32Facilitator fee in basis points.
credit_scores: Arc<RwLock<HashMap<String, CreditScore>>>In-memory credit score cache, keyed by agent_id.
credit_lines: Arc<RwLock<HashMap<String, CreditLine>>>In-memory credit lines, keyed by agent_id.
trust_contexts: Arc<RwLock<HashMap<String, TrustContext>>>In-memory trust context cache, keyed by agent_id (from Autonomic).
payment_histories: Arc<RwLock<HashMap<String, PaymentHistory>>>In-memory payment history cache, keyed by agent_id.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl !UnwindSafe for AppState
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