pub struct MakerDataClient { /* private fields */ }Expand description
Maker data-plane client.
Implementations§
Source§impl MakerDataClient
impl MakerDataClient
pub fn spawn(config: ManagedWsConfig) -> Result<Self, MakerClientError>
Sourcepub async fn request_all<R: MakerDataRequest>(
&self,
request: R,
timeout: Duration,
) -> Result<MakerResponse<R::Response>, MakerDataRequestError>
pub async fn request_all<R: MakerDataRequest>( &self, request: R, timeout: Duration, ) -> Result<MakerResponse<R::Response>, MakerDataRequestError>
Fetch the complete response. A list request follows every page, so use
request_page to stop early.
Sourcepub async fn request_page<R: MakerDataRequest>(
&self,
request: R,
timeout: Duration,
) -> Result<MakerResponse<R::Response>, MakerDataRequestError>
pub async fn request_page<R: MakerDataRequest>( &self, request: R, timeout: Duration, ) -> Result<MakerResponse<R::Response>, MakerDataRequestError>
Fetch exactly one page. Use request_all for a complete collection.
Sourcepub async fn all_pages<R: PagedRequest>(
&self,
request: R,
timeout: Duration,
) -> Result<R::Response, MakerDataRequestError>
pub async fn all_pages<R: PagedRequest>( &self, request: R, timeout: Duration, ) -> Result<R::Response, MakerDataRequestError>
Every page of request at the server’s largest page size; its own
limit and cursor are ignored. Pages after the first are appended.
Sourcepub fn subscribe_messages(&self) -> ManagedMessageReceiver
pub fn subscribe_messages(&self) -> ManagedMessageReceiver
Receive owner-direct PositionUpdated, TradeExecuted and
MakerCapsUpdated pushes alongside query responses. No subscription is
required. Owner pushes begin after MmSummary recovery; quote lifecycle
messages stay on the quote session. On reconnect or a stream gap, rebuild
authoritative state (for example with maker_open_positions).
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 MakerDataClient
impl !UnwindSafe for MakerDataClient
impl Forget for MakerDataClient
impl Freeze for MakerDataClient
impl Send for MakerDataClient
impl Sync for MakerDataClient
impl Unpin for MakerDataClient
impl UnsafeUnpin for MakerDataClient
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