pub struct Ftx {
pub ids: SubscriptionIds,
}Fields
ids: SubscriptionIdsTrait Implementations
sourceimpl<'de> Deserialize<'de> for Ftx
impl<'de> Deserialize<'de> for Ftx
sourcefn 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
sourceimpl ExchangeTransformer for Ftx
impl ExchangeTransformer for Ftx
sourceconst EXCHANGE: ExchangeTransformerId = ExchangeTransformerId::Ftx
const EXCHANGE: ExchangeTransformerId = ExchangeTransformerId::Ftx
Unique identifier for an ExchangeTransformer.
sourcefn new(ids: SubscriptionIds) -> Self
fn new(ids: SubscriptionIds) -> Self
Construct a new ExchangeTransformer using a HashMap containing the relationship between
all active Barter Subscriptions and their associated exchange specific identifiers. Read more
sourceimpl Subscriber for Ftx
impl Subscriber for Ftx
type SubResponse = FtxSubResponse
type SubResponse = FtxSubResponse
Deserialisable type that this Subscriber expects to receive from the exchange in
response to Subscription requests. Implements Validator in order to determine
if the SubResponse communicates a successful outcome. Read more
sourcefn base_url() -> &'static str
fn base_url() -> &'static str
Returns the Base URL of the exchange to establish a connection with.
sourcefn build_subscription_meta(
subscriptions: &[Subscription]
) -> Result<SubscriptionMeta, SocketError>
fn build_subscription_meta(
subscriptions: &[Subscription]
) -> Result<SubscriptionMeta, SocketError>
Uses the provided Barter Subscriptions to build exchange specific subscription
payloads. Generates a SubscriptionIds Hashmap that is used by an ExchangeTransformer
to identify the Barter Subscriptions associated with received messages. Read more
sourcefn subscribe<'life0, 'async_trait>(
subscriptions: &'life0 [Subscription]
) -> Pin<Box<dyn Future<Output = Result<(WebSocket, SubscriptionIds), SocketError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Send + 'async_trait,
fn subscribe<'life0, 'async_trait>(
subscriptions: &'life0 [Subscription]
) -> Pin<Box<dyn Future<Output = Result<(WebSocket, SubscriptionIds), SocketError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Send + 'async_trait,
Initialises a WebSocket connection, actions the provided collection of Barter
Subscriptions, and validates that the Subscription were accepted by the exchange. Read more
sourcefn validate<'life0, 'async_trait>(
websocket: &'life0 mut WebSocket,
expected_responses: usize
) -> Pin<Box<dyn Future<Output = Result<(), SocketError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Send + 'async_trait,
fn validate<'life0, 'async_trait>(
websocket: &'life0 mut WebSocket,
expected_responses: usize
) -> Pin<Box<dyn Future<Output = Result<(), SocketError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Send + 'async_trait,
Uses the provided WebSocket connection to consume Subscription responses and
validate their outcomes. Read more
sourcefn subscription_timeout() -> Duration
fn subscription_timeout() -> Duration
Return the expected Duration in which the exchange will respond to all actioned
WebSocket Subscription requests. Read more
sourceimpl Transformer<MarketData> for Ftx
impl Transformer<MarketData> for Ftx
type Input = FtxMessage
type OutputIter = Vec<Result<MarketData, SocketError>, Global>
fn transform(&mut self, input: Self::Input) -> Self::OutputIter
impl Eq for Ftx
impl StructuralEq for Ftx
impl StructuralPartialEq for Ftx
Auto Trait Implementations
impl RefUnwindSafe for Ftx
impl Send for Ftx
impl Sync for Ftx
impl Unpin for Ftx
impl UnwindSafe for Ftx
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more