pub struct StockBuilder<S = Missing> { /* private fields */ }Expand description
Stock contract builder with type-safe API
Implementations§
Source§impl StockBuilder<Missing>
impl StockBuilder<Missing>
Source§impl StockBuilder<Symbol>
impl StockBuilder<Symbol>
Sourcepub fn on_exchange(self, exchange: impl Into<Exchange>) -> Self
pub fn on_exchange(self, exchange: impl Into<Exchange>) -> Self
Route the order to the specified exchange instead of the default.
Sourcepub fn in_currency(self, currency: impl Into<Currency>) -> Self
pub fn in_currency(self, currency: impl Into<Currency>) -> Self
Quote the contract in a different currency.
Sourcepub fn primary(self, exchange: impl Into<Exchange>) -> Self
pub fn primary(self, exchange: impl Into<Exchange>) -> Self
Prefer a specific primary exchange when resolving the contract.
Sourcepub fn trading_class(self, class: impl Into<String>) -> Self
pub fn trading_class(self, class: impl Into<String>) -> Self
Hint the trading class for venues that require it.
Trait Implementations§
Source§impl<S: Clone> Clone for StockBuilder<S>
impl<S: Clone> Clone for StockBuilder<S>
Source§fn clone(&self) -> StockBuilder<S>
fn clone(&self) -> StockBuilder<S>
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<S> Freeze for StockBuilder<S>where
S: Freeze,
impl<S> RefUnwindSafe for StockBuilder<S>where
S: RefUnwindSafe,
impl<S> Send for StockBuilder<S>where
S: Send,
impl<S> Sync for StockBuilder<S>where
S: Sync,
impl<S> Unpin for StockBuilder<S>where
S: Unpin,
impl<S> UnwindSafe for StockBuilder<S>where
S: UnwindSafe,
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