pub enum UpperType {
Russia,
Foreign,
Currency,
Futures,
}Expand description
Top-level kind of a portfolio position (the upperType field).
The broker docs call the field “top-level instrument type” and do not list its values. These four are the ones the code knows, not verified against the live API. The portfolio models keep the field as a string for that reason.
§Examples
use brokapi_bcs_protocol::models::enums::UpperType;
let t: UpperType = serde_json::from_str("\"FUTURES\"")?;
assert_eq!(t, UpperType::Futures);Variants§
Russia
Russian securities (RUSSIA).
Foreign
Foreign securities (FOREIGN).
Currency
Currency (CURRENCY).
Futures
Futures (FUTURES).
Trait Implementations§
impl Copy for UpperType
Source§impl<'de> Deserialize<'de> for UpperType
impl<'de> Deserialize<'de> for UpperType
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
impl Eq for UpperType
impl StructuralPartialEq for UpperType
Auto Trait Implementations§
impl Freeze for UpperType
impl RefUnwindSafe for UpperType
impl Send for UpperType
impl Sync for UpperType
impl Unpin for UpperType
impl UnsafeUnpin for UpperType
impl UnwindSafe for UpperType
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
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.