pub struct AccountPanel {
pub broker: String,
pub accounts: Vec<String>,
pub active: usize,
/* private fields */
}Expand description
The account panel of Trading, shown with Trading::show_account_panel.
A tab named after the broker sits above the account selectors and the account’s summary:
balance, equity, realised and unrealised profit and loss, margin, available funds and the
margin of working orders, each shown when the broker reports it. The tab marks a broker that
reports that it is connecting or disconnected, until it reports that it is live. Below are the
positions, working orders, finished orders, balance changes and trading journal the broker
pushes, each with a column chooser and an export. Order History also lists individual
executions. A position offers close, and an order offers edit and cancel on hover; each waits
for the user’s confirmation like the chart’s lines. Clicking
a symbol asks the host to show it. Each history keeps the most recent 1,000 entries; active
orders are retained independently. Scrolling to the end of a history asks
Broker::history for the entries before its oldest
one, a page at a time, until the broker has nothing older or the history lists 1,000
entries. Each entry is listed once, whether a page or the broker’s stream brings it first,
and pages change no working order or position.
Fields§
§broker: StringThe broker’s name, shown on the tab and in the account selector.
accounts: Vec<String>The accounts the host offers at the broker, such as “Paper 1”. The selector shows the
active one with the account’s currency and switches between them.
active: usizeThe index in accounts of the connected account.
Trait Implementations§
Source§impl Default for AccountPanel
impl Default for AccountPanel
Source§fn default() -> AccountPanel
fn default() -> AccountPanel
Auto Trait Implementations§
impl Freeze for AccountPanel
impl RefUnwindSafe for AccountPanel
impl Send for AccountPanel
impl Sync for AccountPanel
impl Unpin for AccountPanel
impl UnsafeUnpin for AccountPanel
impl UnwindSafe for AccountPanel
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more