Struct barter_integration::model::SubscriptionId
source · pub struct SubscriptionId(pub String);Expand description
New type representing a unique String identifier for a stream that has been subscribed to.
This is used to identify data structures received over the socket.
For example, Barter-Data uses this identifier to associate received data structures from the
exchange with the original Barter-Data Subscription that was actioned over the socket.
Note: Each exchange will require the use of different String identifiers depending on the
data structures they send.
eg/ SubscriptionId of an FtxTrade is “{BASE}/{QUOTE}” (ie/ market).
eg/ SubscriptionId of a BinanceTrade is “{base}{symbol}@trade” (ie/ channel).
Tuple Fields§
§0: StringTrait Implementations§
source§impl AsRef<str> for SubscriptionId
impl AsRef<str> for SubscriptionId
source§impl Clone for SubscriptionId
impl Clone for SubscriptionId
source§fn clone(&self) -> SubscriptionId
fn clone(&self) -> SubscriptionId
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for SubscriptionId
impl Debug for SubscriptionId
source§impl<'de> Deserialize<'de> for SubscriptionId
impl<'de> Deserialize<'de> for SubscriptionId
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
source§impl Display for SubscriptionId
impl Display for SubscriptionId
source§impl<S> From<S> for SubscriptionId
impl<S> From<S> for SubscriptionId
source§impl Hash for SubscriptionId
impl Hash for SubscriptionId
source§impl Ord for SubscriptionId
impl Ord for SubscriptionId
source§fn cmp(&self, other: &SubscriptionId) -> Ordering
fn cmp(&self, other: &SubscriptionId) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SubscriptionId
impl PartialEq for SubscriptionId
source§fn eq(&self, other: &SubscriptionId) -> bool
fn eq(&self, other: &SubscriptionId) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for SubscriptionId
impl PartialOrd for SubscriptionId
source§fn partial_cmp(&self, other: &SubscriptionId) -> Option<Ordering>
fn partial_cmp(&self, other: &SubscriptionId) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for SubscriptionId
impl Serialize for SubscriptionId
impl Eq for SubscriptionId
impl StructuralPartialEq for SubscriptionId
Auto Trait Implementations§
impl Freeze for SubscriptionId
impl RefUnwindSafe for SubscriptionId
impl Send for SubscriptionId
impl Sync for SubscriptionId
impl Unpin for SubscriptionId
impl UnwindSafe for SubscriptionId
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
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§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
Compare self to
key and return true if they are equal.