Skip to main content

Request

Struct Request 

Source
pub struct Request { /* private fields */ }
Expand description

HTTP request representation for Gate.io API calls

Implementations§

Source§

impl Request

Source

pub fn method(&self) -> &Method

Returns the HTTP method for this request

Source

pub fn path(&self) -> &str

Returns the API path for this request

Source

pub fn params(&self) -> &[(String, String)]

Returns the query parameters for this request

Source

pub fn payload(&self) -> &str

Returns the request body payload

Source

pub fn x_gate_exp_time(&self) -> &Option<u128>

Returns the Gate expiration time if set

Source

pub fn credentials(&self) -> &Option<Credentials>

Returns the API credentials if set

Source

pub fn sign(&self) -> &bool

Returns whether this request should be signed

Trait Implementations§

Source§

impl Debug for Request

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Request

Source§

impl From<AmendBatchOrders> for Request

Source§

fn from(request: AmendBatchOrders) -> Request

Converts to this type from the input type.
Source§

impl From<AmendOrder> for Request

Source§

fn from(request: AmendOrder) -> Request

Converts to this type from the input type.
Source§

impl From<CancelAllOpenOrders> for Request

Source§

fn from(request: CancelAllOpenOrders) -> Request

Converts to this type from the input type.
Source§

impl From<CancelAllPriceOrders> for Request

Source§

fn from(request: CancelAllPriceOrders) -> Request

Converts to this type from the input type.
Source§

impl From<CancelBatchOrders> for Request

Source§

fn from(request: CancelBatchOrders) -> Request

Converts to this type from the input type.
Source§

impl From<CancelOrder> for Request

Source§

fn from(request: CancelOrder) -> Request

Converts to this type from the input type.
Source§

impl From<CancelPriceOrder> for Request

Source§

fn from(request: CancelPriceOrder) -> Request

Converts to this type from the input type.
Source§

impl From<CountdownCancelAll> for Request

Source§

fn from(request: CountdownCancelAll) -> Request

Converts to this type from the input type.
Source§

impl From<CreateBatchOrders> for Request

Source§

fn from(request: CreateBatchOrders) -> Request

Converts to this type from the input type.
Source§

impl From<CreateCrossLiquidateOrders> for Request

Source§

fn from(request: CreateCrossLiquidateOrders) -> Request

Converts to this type from the input type.
Source§

impl From<CreateOrder> for Request

Source§

fn from(request: CreateOrder) -> Request

Converts to this type from the input type.
Source§

impl From<CreatePriceOrder> for Request

Source§

fn from(request: CreatePriceOrder) -> Request

Converts to this type from the input type.
Source§

impl From<GetAccount> for Request

Source§

fn from(request: GetAccount) -> Request

Converts to this type from the input type.
Source§

impl From<GetAccountBook> for Request

Source§

fn from(request: GetAccountBook) -> Request

Converts to this type from the input type.
Source§

impl From<GetBatchUserFee> for Request

Source§

fn from(request: GetBatchUserFee) -> Request

Converts to this type from the input type.
Source§

impl From<GetCandlesticks> for Request

Source§

fn from(request: GetCandlesticks) -> Request

Converts to this type from the input type.
Source§

impl From<GetCurrencies> for Request

Source§

fn from(request: GetCurrencies) -> Request

Converts to this type from the input type.
Source§

impl From<GetCurrency> for Request

Source§

fn from(request: GetCurrency) -> Request

Converts to this type from the input type.
Source§

impl From<GetCurrencyPair> for Request

Source§

fn from(request: GetCurrencyPair) -> Request

Converts to this type from the input type.
Source§

impl From<GetCurrencyPairs> for Request

Source§

fn from(request: GetCurrencyPairs) -> Request

Converts to this type from the input type.
Source§

impl From<GetFee> for Request

Source§

fn from(request: GetFee) -> Request

Converts to this type from the input type.
Source§

impl From<GetInsuranceHistory> for Request

Source§

fn from(req: GetInsuranceHistory) -> Request

Converts to this type from the input type.
Source§

impl From<GetMarketTrades> for Request

Source§

fn from(request: GetMarketTrades) -> Request

Converts to this type from the input type.
Source§

impl From<GetMyTrades> for Request

Source§

fn from(request: GetMyTrades) -> Request

Converts to this type from the input type.
Source§

impl From<GetOpenOrders> for Request

Source§

fn from(request: GetOpenOrders) -> Request

Converts to this type from the input type.
Source§

impl From<GetOrder> for Request

Source§

fn from(request: GetOrder) -> Request

Converts to this type from the input type.
Source§

impl From<GetOrderbook> for Request

Source§

fn from(request: GetOrderbook) -> Request

Converts to this type from the input type.
Source§

impl From<GetOrders> for Request

Source§

fn from(request: GetOrders) -> Request

Converts to this type from the input type.
Source§

impl From<GetPriceOrder> for Request

Source§

fn from(request: GetPriceOrder) -> Request

Converts to this type from the input type.
Source§

impl From<GetPriceOrders> for Request

Source§

fn from(request: GetPriceOrders) -> Request

Converts to this type from the input type.
Source§

impl From<GetServerTime> for Request

Source§

fn from(request: GetServerTime) -> Request

Converts to this type from the input type.
Source§

impl From<GetTicker> for Request

Source§

fn from(g: GetTicker) -> Request

Converts to this type from the input type.
Source§

impl From<RequestBuilder> for Request

Source§

fn from(builder: RequestBuilder) -> Request

Converts to this type from the input type.
Source§

impl PartialEq for Request

Source§

fn eq(&self, other: &Request) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Request

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.