Struct exc_core::exchange::tickers::MakeTickersOptions
source · pub struct MakeTickersOptions { /* private fields */ }Expand description
Options for making a service to subscribe tickers.
Implementations§
source§impl MakeTickersOptions
impl MakeTickersOptions
sourcepub fn prefer_trade_bid_ask(self, flag: bool) -> MakeTickersOptions
pub fn prefer_trade_bid_ask(self, flag: bool) -> MakeTickersOptions
Set whether to prefer use ticker from trade bid/ask. Default is false.
sourcepub fn first_trade(self, mode: FirstTrade) -> MakeTickersOptions
pub fn first_trade(self, mode: FirstTrade) -> MakeTickersOptions
Set how to get the first trade. Default is FirstTrade::Wait.
Only works when MakeTickersOptions::prefer_trade_bid_ask is true.
sourcepub fn is_prefer_trade_bid_ask(&self) -> bool
pub fn is_prefer_trade_bid_ask(&self) -> bool
Get whether to prefer use ticker from trade bid/ask.
sourcepub fn get_first_trade(&self) -> FirstTrade
pub fn get_first_trade(&self) -> FirstTrade
Get how to get the first trade.
sourcepub fn accept_bid_ask_ts(self, flag: bool) -> MakeTickersOptions
pub fn accept_bid_ask_ts(self, flag: bool) -> MakeTickersOptions
Accept bid/ask ts. Default is false. Only works when
MakeTickersOptions::prefer_trade_bid_ask is true.
sourcepub fn is_accept_bid_ask_ts(&self) -> bool
pub fn is_accept_bid_ask_ts(&self) -> bool
Get whether to accept bid/ask ts.
Trait Implementations§
source§impl Debug for MakeTickersOptions
impl Debug for MakeTickersOptions
source§impl Default for MakeTickersOptions
impl Default for MakeTickersOptions
source§fn default() -> MakeTickersOptions
fn default() -> MakeTickersOptions
Returns the “default value” for a type. Read more
source§impl<M> Service<MakeTickersOptions> for AsService<'_, M>where
M: MakeTickers,
impl<M> Service<MakeTickersOptions> for AsService<'_, M>where
M: MakeTickers,
§type Response = <M as MakeTickers>::Service
type Response = <M as MakeTickers>::Service
Responses given by the service.
§type Error = ExchangeError
type Error = ExchangeError
Errors produced by the service.
§type Future = <M as MakeTickers>::Future
type Future = <M as MakeTickers>::Future
The future response value.
source§fn poll_ready(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<(), <AsService<'_, M> as Service<MakeTickersOptions>>::Error>>
fn poll_ready( &mut self, cx: &mut Context<'_> ) -> Poll<Result<(), <AsService<'_, M> as Service<MakeTickersOptions>>::Error>>
Returns
Poll::Ready(Ok(())) when the service is able to process requests. Read moresource§fn call(
&mut self,
options: MakeTickersOptions
) -> <AsService<'_, M> as Service<MakeTickersOptions>>::Future
fn call( &mut self, options: MakeTickersOptions ) -> <AsService<'_, M> as Service<MakeTickersOptions>>::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl RefUnwindSafe for MakeTickersOptions
impl Send for MakeTickersOptions
impl Sync for MakeTickersOptions
impl Unpin for MakeTickersOptions
impl UnwindSafe for MakeTickersOptions
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