pub struct Portfolio {
pub currency: String,
pub accounts: Vec<AccountSummaryResponse>,
pub total_usd_value: Option<f64>,
pub cross_margin_enabled: bool,
}Expand description
Portfolio information
Fields§
§currency: StringCurrency of the portfolio
accounts: Vec<AccountSummaryResponse>Account summaries for different currencies
total_usd_value: Option<f64>Total portfolio value in USD
cross_margin_enabled: boolCross-currency margin enabled
Implementations§
Source§impl Portfolio
impl Portfolio
Sourcepub fn add_account(&mut self, account: AccountSummaryResponse)
pub fn add_account(&mut self, account: AccountSummaryResponse)
Add an account summary to the portfolio
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Portfolio
impl<'de> Deserialize<'de> for Portfolio
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Portfolio
impl RefUnwindSafe for Portfolio
impl Send for Portfolio
impl Sync for Portfolio
impl Unpin for Portfolio
impl UnwindSafe for Portfolio
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.