pub struct MakerQuoteClient { /* private fields */ }Expand description
Maker quote-plane client.
try_* methods return immediately when the outbound queue is full. A
successful SendTicket reports a socket write, not a server acknowledgement.
Implementations§
Source§impl MakerQuoteClient
impl MakerQuoteClient
pub fn spawn(config: ManagedWsConfig) -> Result<Self, MakerClientError>
Sourcepub async fn quote_in_epoch(
&self,
payload: QuoteMessage,
connection_epoch: u64,
) -> Result<(), ManagedWsError>
pub async fn quote_in_epoch( &self, payload: QuoteMessage, connection_epoch: u64, ) -> Result<(), ManagedWsError>
Send only in connection_epoch, the epoch whose recovery the strategy
applied; a reconnect in between rejects the quote with NotReady.
Success confirms only the socket write. Subscribe before sending and feed
messages to super::QuoteOutcomeTracker to track the server outcome.
pub fn try_quote_in_epoch( &self, payload: QuoteMessage, connection_epoch: u64, ) -> Result<SendTicket, ManagedWsError>
pub async fn replace_in_epoch( &self, payload: ReplaceQuoteMessage, connection_epoch: u64, ) -> Result<(), ManagedWsError>
pub fn try_replace_in_epoch( &self, payload: ReplaceQuoteMessage, connection_epoch: u64, ) -> Result<SendTicket, ManagedWsError>
pub async fn batch_quotes_in_epoch( &self, payload: BatchQuotesMessage, connection_epoch: u64, ) -> Result<(), ManagedWsError>
pub fn try_batch_quotes_in_epoch( &self, payload: BatchQuotesMessage, connection_epoch: u64, ) -> Result<SendTicket, ManagedWsError>
pub async fn cancel_quote( &self, payload: CancelQuoteData, ) -> Result<(), ManagedWsError>
pub fn try_cancel_quote( &self, payload: CancelQuoteData, ) -> Result<SendTicket, ManagedWsError>
pub async fn cancel_all_quotes( &self, payload: CancelAllQuotesMessage, ) -> Result<(), ManagedWsError>
pub fn try_cancel_all_quotes( &self, payload: CancelAllQuotesMessage, ) -> Result<SendTicket, ManagedWsError>
pub async fn indicative_prices_response( &self, payload: IndicativePricesResponseMessage, ) -> Result<(), ManagedWsError>
pub fn try_indicative_prices_response( &self, payload: IndicativePricesResponseMessage, ) -> Result<SendTicket, ManagedWsError>
pub async fn subscribe( &self, payload: SubscribeData, ) -> Result<(), ManagedWsError>
pub async fn unsubscribe( &self, payload: UnsubscribeData, ) -> Result<(), ManagedWsError>
pub async fn add_mints( &self, payload: AddMintsData, ) -> Result<(), ManagedWsError>
pub async fn remove_mints( &self, payload: RemoveMintsData, ) -> Result<(), ManagedWsError>
pub async fn add_channels( &self, payload: AddChannelsData, ) -> Result<(), ManagedWsError>
pub async fn remove_channels( &self, payload: RemoveChannelsData, ) -> Result<(), ManagedWsError>
pub fn subscribe_messages(&self) -> ManagedMessageReceiver
pub fn subscribe_reference_changes(&self) -> ReferenceChangeReceiver
pub fn subscribe_events(&self) -> Receiver<ManagedWsEvent>
pub fn state(&self) -> ManagedWsState
pub async fn wait_until_ready(&self) -> Result<u64, WaitUntilReadyError>
pub const fn raw(&self) -> &ManagedWsHandle
pub fn into_raw(self) -> ManagedWsHandle
pub async fn close(&self) -> Result<(), ManagedWsError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MakerQuoteClient
impl !UnwindSafe for MakerQuoteClient
impl Forget for MakerQuoteClient
impl Freeze for MakerQuoteClient
impl Send for MakerQuoteClient
impl Sync for MakerQuoteClient
impl Unpin for MakerQuoteClient
impl UnsafeUnpin for MakerQuoteClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more