pub struct ConfiguredContract {
pub contract: Contract,
pub build_options_chain: Option<bool>,
pub build_futures_chain: Option<bool>,
pub min_expiry_days: Option<u32>,
pub max_expiry_days: Option<u32>,
pub options_chain_exchange: Option<String>,
}Expand description
A configured IB contract with optional per-contract chain-building settings.
Fields§
§contract: ContractThe IB contract to load.
build_options_chain: Option<bool>Whether to build the options chain for this contract, overriding the global flag.
build_futures_chain: Option<bool>Whether to build the futures chain for this contract, overriding the global flag.
min_expiry_days: Option<u32>Minimum expiry days for this contract’s chains, overriding the global value.
max_expiry_days: Option<u32>Maximum expiry days for this contract’s chains, overriding the global value.
options_chain_exchange: Option<String>Exchange override for options chain lookups.
Implementations§
Source§impl ConfiguredContract
impl ConfiguredContract
Sourcepub fn to_json_value(&self) -> Value
pub fn to_json_value(&self) -> Value
Convert to the JSON representation used in configuration files.
Sourcepub fn chain_spec_json(&self) -> Option<Value>
pub fn chain_spec_json(&self) -> Option<Value>
Chain-building spec for load_contract_spec, when any per-contract setting is present.
Trait Implementations§
Source§impl Clone for ConfiguredContract
impl Clone for ConfiguredContract
Source§impl Debug for ConfiguredContract
impl Debug for ConfiguredContract
Auto Trait Implementations§
impl Freeze for ConfiguredContract
impl RefUnwindSafe for ConfiguredContract
impl Send for ConfiguredContract
impl Sync for ConfiguredContract
impl Unpin for ConfiguredContract
impl UnsafeUnpin for ConfiguredContract
impl UnwindSafe for ConfiguredContract
Blanket Implementations§
impl<T> Allocation for T
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
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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