#[non_exhaustive]pub enum SubscriptionType {
MarketData,
MarketDataLite,
Trade,
Order,
Position,
AccountBalance,
Other(String),
}Expand description
A value of the server’s subscriptionType enum.
The wire format is the fully-qualified enum name — SUBSCRIPTION_TYPE_TRADE,
not trade. Use SubscriptionType::as_wire to see the exact string that
goes on the socket.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MarketData
Full order-book depth. Markets endpoint.
MarketDataLite
Best-bid/offer only. Markets endpoint.
Trade
Trade executions. Markets endpoint.
Order
Order lifecycle events. Private endpoint.
Position
Position changes. Private endpoint.
AccountBalance
Account balance changes. Private endpoint.
Other(String)
A subscription type this SDK does not model yet.
The contained string is sent verbatim, so it must already be in wire
form (SUBSCRIPTION_TYPE_...). This exists so a newly documented type
can be used without waiting for a crate release.
Implementations§
Source§impl SubscriptionType
impl SubscriptionType
Sourcepub fn from_wire(raw: &str) -> Self
pub fn from_wire(raw: &str) -> Self
Parse a wire string back into a variant, falling back to
SubscriptionType::Other for anything unrecognised.
Sourcepub fn endpoint(&self) -> Option<StreamEndpoint>
pub fn endpoint(&self) -> Option<StreamEndpoint>
Which socket carries this type, or None for an unmodelled type.
Trait Implementations§
Source§impl Clone for SubscriptionType
impl Clone for SubscriptionType
Source§fn clone(&self) -> SubscriptionType
fn clone(&self) -> SubscriptionType
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 SubscriptionType
impl Debug for SubscriptionType
Source§impl<'de> Deserialize<'de> for SubscriptionType
impl<'de> Deserialize<'de> for SubscriptionType
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Display for SubscriptionType
impl Display for SubscriptionType
impl Eq for SubscriptionType
Source§impl Hash for SubscriptionType
impl Hash for SubscriptionType
Source§impl PartialEq for SubscriptionType
impl PartialEq for SubscriptionType
Source§impl Serialize for SubscriptionType
impl Serialize for SubscriptionType
impl StructuralPartialEq for SubscriptionType
Auto Trait Implementations§
impl Freeze for SubscriptionType
impl RefUnwindSafe for SubscriptionType
impl Send for SubscriptionType
impl Sync for SubscriptionType
impl Unpin for SubscriptionType
impl UnsafeUnpin for SubscriptionType
impl UnwindSafe for SubscriptionType
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.