#[non_exhaustive]pub struct Capabilities {
pub market: bool,
pub limit: bool,
pub stop: bool,
pub stop_limit: bool,
pub brackets: bool,
pub take_profit_levels: bool,
pub close: bool,
pub reverse: bool,
pub preview: bool,
pub modify: bool,
}Expand description
The order types the account accepts. The terminal hides the controls for the others. By default the account accepts none; set the fields it accepts:
use egui_charts::model::Capabilities;
let mut capabilities = Capabilities::default();
capabilities.market = true;
capabilities.limit = true;Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.market: boolAccepts market orders.
limit: boolAccepts limit orders.
stop: boolAccepts stop orders.
stop_limit: boolAccepts stop-limit orders.
brackets: boolAccepts a take-profit and a stop-loss with an order, and with modify
adds them to a working order.
take_profit_levels: boolAccepts several take profits with an order, each closing its own quantity, through
OrderRequest::take_profit_levels. Needs brackets; without it the
order ticket offers one take profit.
close: boolCloses a position with an opposite market order, so the Close and Flatten controls work.
reverse: boolReverses a position with an opposite market order of twice its size, so the Reverse controls work.
preview: boolAnswers Broker::preview, so the ticket offers to
preview an order before it is placed.
modify: boolChanges working orders through Broker::modify, so
their lines on the chart can be dragged, and with brackets exits
added to them.
Implementations§
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§fn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Capabilities
Source§impl Debug for Capabilities
impl Debug for Capabilities
Source§impl Default for Capabilities
impl Default for Capabilities
Source§fn default() -> Capabilities
fn default() -> Capabilities
impl Eq for Capabilities
Source§impl PartialEq for Capabilities
impl PartialEq for Capabilities
impl StructuralPartialEq for Capabilities
Auto Trait Implementations§
impl Freeze for Capabilities
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnsafeUnpin for Capabilities
impl UnwindSafe for Capabilities
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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