Trait exc::Adaptor

pub trait Adaptor<R>: Request
where R: Request,
{ // Required methods fn from_request(req: R) -> Result<Self, ExchangeError>; fn into_response( resp: Self::Response ) -> Result<<R as Request>::Response, ExchangeError>; }
Expand description

An adaptor for request.

Required Methods§

fn from_request(req: R) -> Result<Self, ExchangeError>

Convert from request.

fn into_response( resp: Self::Response ) -> Result<<R as Request>::Response, ExchangeError>

Convert into response.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Adaptor<CancelOrder> for exc::binance::Request

source§

impl Adaptor<CancelOrder> for OkxRequest

source§

impl Adaptor<CancelOrder> for exc::okx::websocket::Request

source§

impl Adaptor<GetOrder> for exc::binance::Request

source§

impl Adaptor<GetOrder> for OkxRequest

source§

impl Adaptor<GetOrder> for HttpRequest

source§

impl Adaptor<PlaceOrder> for exc::binance::Request

source§

impl Adaptor<PlaceOrder> for OkxRequest

source§

impl Adaptor<PlaceOrder> for exc::okx::websocket::Request

source§

impl Adaptor<SubscribeBidAsk> for exc::binance::Request

source§

impl Adaptor<SubscribeBidAsk> for OkxRequest

source§

impl Adaptor<SubscribeBidAsk> for exc::okx::websocket::Request

source§

impl Adaptor<SubscribeOrders> for exc::binance::Request

source§

impl Adaptor<SubscribeOrders> for OkxRequest

source§

impl Adaptor<SubscribeOrders> for exc::okx::websocket::Request

source§

impl Adaptor<SubscribeTickers> for OkxRequest

source§

impl Adaptor<FetchInstruments> for exc::binance::Request

source§

impl Adaptor<FetchInstruments> for OkxRequest

source§

impl Adaptor<FetchInstruments> for HttpRequest

source§

impl Adaptor<QueryFirstCandles> for exc::binance::Request

source§

impl Adaptor<QueryLastCandles> for OkxRequest

source§

impl Adaptor<QueryLastCandles> for HttpRequest

source§

impl Adaptor<Reconnect> for exc::binance::Request

source§

impl Adaptor<Reconnect> for OkxRequest

source§

impl Adaptor<SubscribeInstruments> for OkxRequest

source§

impl Adaptor<SubscribeInstruments> for exc::okx::websocket::Request

source§

impl Adaptor<SubscribeTrades> for exc::binance::Request

source§

impl Adaptor<SubscribeTrades> for OkxRequest

source§

impl Adaptor<SubscribeTrades> for exc::okx::websocket::Request

§

impl<T, R, E> Adaptor<R> for T
where T: Request + TryFrom<R, Error = E>, R: Request, <T as Request>::Response: TryInto<<R as Request>::Response, Error = E>, ExchangeError: From<E>,