pub struct PrivateSubscription(/* private fields */);Expand description
A subscription valid on the private endpoint.
Implementations§
Source§impl PrivateSubscription
impl PrivateSubscription
Sourcepub fn orders() -> Self
pub fn orders() -> Self
Order lifecycle events. Restrict to specific markets with
PrivateSubscription::with_market_slugs.
Sourcepub fn account_balances() -> Self
pub fn account_balances() -> Self
Account balance changes.
Sourcepub fn custom(subscription_type: impl Into<String>) -> Self
pub fn custom(subscription_type: impl Into<String>) -> Self
A private subscription type this SDK does not model yet. The string is
sent verbatim, so pass it in wire form (SUBSCRIPTION_TYPE_...).
As with MarketSubscription::custom, a known type string resolves to
its variant and stays subject to endpoint validation.
Source§impl PrivateSubscription
impl PrivateSubscription
Sourcepub fn request_id(&self) -> &str
pub fn request_id(&self) -> &str
The requestId sent with this subscription. Pass it to
unsubscribe to cancel.
pub fn subscription_type(&self) -> &SubscriptionType
pub fn market_slugs(&self) -> &[String]
Sourcepub fn with_request_id(self, request_id: impl Into<String>) -> Self
pub fn with_request_id(self, request_id: impl Into<String>) -> Self
Override the generated requestId.
Sourcepub fn with_market_slugs<I, S>(self, slugs: I) -> Self
pub fn with_market_slugs<I, S>(self, slugs: I) -> Self
Replace the market slugs this subscription covers.
Sourcepub fn add_market_slug(self, slug: impl Into<String>) -> Self
pub fn add_market_slug(self, slug: impl Into<String>) -> Self
Add one more market slug.
Sourcepub fn insert_extra(
self,
key: impl Into<String>,
value: impl Into<Value>,
) -> Self
pub fn insert_extra( self, key: impl Into<String>, value: impl Into<Value>, ) -> Self
Add an arbitrary field to the subscribe object.
Reach for this only when the server documents the field: the endpoint rejects a frame it cannot parse, and an unknown field may be enough to make it unparseable.
Trait Implementations§
Source§impl Clone for PrivateSubscription
impl Clone for PrivateSubscription
Source§fn clone(&self) -> PrivateSubscription
fn clone(&self) -> PrivateSubscription
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more