#[repr(i32)]pub enum InstrumentTypeProto {
InstrumentTypeUnknown = 0,
InstrumentTypeCash = 1,
InstrumentTypeDerivative = 2,
InstrumentTypeReferenceIndex = 3,
}Expand description
Mechanical structure of a Security — orthogonal to productType.
Three values:
CASH A tradable underlying that settles to a position. T-Bill, common stock, BTC, FX spot, money-market fund, ETF.
DERIVATIVE A contract whose value derives from an underlying. Future, option, swap, forward, FX swap, variance swap.
REFERENCE_INDEX Observational only, never positioned. Used as fixings for derivatives or as display benchmarks. Cash-index values (.SPX, .NDX, .VIX), reference rate series (.SOFR, .CPI), and benchmark indices (Bloomberg Commodity Index).
The distinction matters because: .SPX (REFERENCE_INDEX) and SPY (CASH ETF that tracks .SPX) are both “EQUITY index”-flavoured but only SPY is positionable; ES future (DERIVATIVE) is positionable but isn’t the same instrument as either.
Enum-value names are prefixed INSTRUMENT_TYPE_* because proto3 enforces package-wide uniqueness for enum value names — bare CASH would collide with IdentifierTypeProto.CASH in this package.
Variants§
InstrumentTypeUnknown = 0
InstrumentTypeCash = 1
InstrumentTypeDerivative = 2
InstrumentTypeReferenceIndex = 3
Implementations§
Source§impl InstrumentTypeProto
impl InstrumentTypeProto
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for InstrumentTypeProto
impl Clone for InstrumentTypeProto
Source§fn clone(&self) -> InstrumentTypeProto
fn clone(&self) -> InstrumentTypeProto
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstrumentTypeProto
impl Debug for InstrumentTypeProto
Source§impl Default for InstrumentTypeProto
impl Default for InstrumentTypeProto
Source§fn default() -> InstrumentTypeProto
fn default() -> InstrumentTypeProto
Source§impl From<InstrumentTypeProto> for i32
impl From<InstrumentTypeProto> for i32
Source§fn from(value: InstrumentTypeProto) -> i32
fn from(value: InstrumentTypeProto) -> i32
Source§impl Hash for InstrumentTypeProto
impl Hash for InstrumentTypeProto
Source§impl Ord for InstrumentTypeProto
impl Ord for InstrumentTypeProto
Source§fn cmp(&self, other: &InstrumentTypeProto) -> Ordering
fn cmp(&self, other: &InstrumentTypeProto) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for InstrumentTypeProto
impl PartialEq for InstrumentTypeProto
Source§fn eq(&self, other: &InstrumentTypeProto) -> bool
fn eq(&self, other: &InstrumentTypeProto) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for InstrumentTypeProto
impl PartialOrd for InstrumentTypeProto
impl Copy for InstrumentTypeProto
impl Eq for InstrumentTypeProto
impl StructuralPartialEq for InstrumentTypeProto
Auto Trait Implementations§
impl Freeze for InstrumentTypeProto
impl RefUnwindSafe for InstrumentTypeProto
impl Send for InstrumentTypeProto
impl Sync for InstrumentTypeProto
impl Unpin for InstrumentTypeProto
impl UnsafeUnpin for InstrumentTypeProto
impl UnwindSafe for InstrumentTypeProto
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request