pub enum HttpRequest {
Get(Get),
PrivateGet(PrivateGet),
}Expand description
Okx HTTP API request types.
Variants§
Trait Implementations§
Source§impl Adaptor<FetchInstruments> for HttpRequest
impl Adaptor<FetchInstruments> for HttpRequest
Source§fn from_request(req: FetchInstruments) -> Result<Self, ExchangeError>where
Self: Sized,
fn from_request(req: FetchInstruments) -> Result<Self, ExchangeError>where
Self: Sized,
Convert from request.
Source§fn into_response(
resp: Self::Response,
) -> Result<<FetchInstruments as Request>::Response, ExchangeError>
fn into_response( resp: Self::Response, ) -> Result<<FetchInstruments as Request>::Response, ExchangeError>
Convert into response.
Source§impl Adaptor<GetOrder> for HttpRequest
impl Adaptor<GetOrder> for HttpRequest
Source§fn from_request(req: GetOrder) -> Result<Self, ExchangeError>where
Self: Sized,
fn from_request(req: GetOrder) -> Result<Self, ExchangeError>where
Self: Sized,
Convert from request.
Source§fn into_response(
resp: Self::Response,
) -> Result<<GetOrder as Request>::Response, ExchangeError>
fn into_response( resp: Self::Response, ) -> Result<<GetOrder as Request>::Response, ExchangeError>
Convert into response.
Source§impl Adaptor<QueryLastCandles> for HttpRequest
impl Adaptor<QueryLastCandles> for HttpRequest
Source§fn from_request(req: QueryLastCandles) -> Result<Self, ExchangeError>where
Self: Sized,
fn from_request(req: QueryLastCandles) -> Result<Self, ExchangeError>where
Self: Sized,
Convert from request.
Source§fn into_response(
resp: Self::Response,
) -> Result<<QueryLastCandles as Request>::Response, ExchangeError>
fn into_response( resp: Self::Response, ) -> Result<<QueryLastCandles as Request>::Response, ExchangeError>
Convert into response.
Source§impl Clone for HttpRequest
impl Clone for HttpRequest
Source§fn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpRequest
impl Debug for HttpRequest
Source§impl Request for HttpRequest
impl Request for HttpRequest
Source§type Response = HttpResponse
type Response = HttpResponse
Response type.
Source§impl<S> Service<HttpRequest> for OkxHttpApi<S>
impl<S> Service<HttpRequest> for OkxHttpApi<S>
Source§type Response = HttpResponse
type Response = HttpResponse
Responses given by the service.
Source§type Error = ExchangeError
type Error = ExchangeError
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<OkxHttpApi<S> as Service<HttpRequest>>::Response, <OkxHttpApi<S> as Service<HttpRequest>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<OkxHttpApi<S> as Service<HttpRequest>>::Response, <OkxHttpApi<S> as Service<HttpRequest>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnwindSafe for HttpRequest
Blanket Implementations§
Source§impl<T, R, E> Adaptor<R> for T
impl<T, R, E> Adaptor<R> for T
Source§fn from_request(req: R) -> Result<T, ExchangeError>
fn from_request(req: R) -> Result<T, ExchangeError>
Convert from request.
Source§fn into_response(
resp: <T as Request>::Response,
) -> Result<<R as Request>::Response, ExchangeError>
fn into_response( resp: <T as Request>::Response, ) -> Result<<R as Request>::Response, ExchangeError>
Convert into response.
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
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