pub struct CapacityResult {
pub total_spendable_cents: u64,
pub available_credit_cents: u64,
pub usdc_balance_cents: u64,
pub weighted_collateral_usdc_base_units: u64,
pub weighted_liabilities_usdc_base_units: u64,
pub position_infos: Vec<PositionInfo>,
}Expand description
Result of spending capacity calculation.
Fields§
§total_spendable_cents: u64Max spendable via liquidating spend (unweighted collateral - slippage - liabilities), in cents. Excludes unliquidatable assets from collateral.
available_credit_cents: u64Available credit line (weighted collateral - weighted liabilities), in cents.
usdc_balance_cents: u64USDC balance (market index 0) in cents.
weighted_collateral_usdc_base_units: u64Total weighted collateral in USDC base units.
weighted_liabilities_usdc_base_units: u64Total weighted liabilities in USDC base units.
position_infos: Vec<PositionInfo>Per-position breakdown for downstream use.
Trait Implementations§
Source§impl Clone for CapacityResult
impl Clone for CapacityResult
Source§fn clone(&self) -> CapacityResult
fn clone(&self) -> CapacityResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CapacityResult
impl RefUnwindSafe for CapacityResult
impl Send for CapacityResult
impl Sync for CapacityResult
impl Unpin for CapacityResult
impl UnsafeUnpin for CapacityResult
impl UnwindSafe for CapacityResult
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