Struct crypto_botters::Client
source · pub struct Client { /* private fields */ }
Implementations§
source§impl Client
impl Client
sourcepub fn update_default_option<O>(&mut self, option: O)
pub fn update_default_option<O>(&mut self, option: O)
Update the default options for this Client
sourcepub async fn request<'a, R, O, Q, B>(
&self,
method: Method,
url: &str,
query: Option<&Q>,
body: Option<B>,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Successful, RequestError<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::BuildError, <<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Unsuccessful>>where
O: HttpOption<'a, R, B>,
O::RequestHandler: RequestHandler<B>,
Self: GetOptions<O::Options>,
Q: Serialize + ?Sized,
pub async fn request<'a, R, O, Q, B>(
&self,
method: Method,
url: &str,
query: Option<&Q>,
body: Option<B>,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Successful, RequestError<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::BuildError, <<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Unsuccessful>>where
O: HttpOption<'a, R, B>,
O::RequestHandler: RequestHandler<B>,
Self: GetOptions<O::Options>,
Q: Serialize + ?Sized,
sourcepub async fn get<'a, R, O, Q>(
&self,
url: &str,
query: Option<&Q>,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
Q: Serialize + ?Sized,
pub async fn get<'a, R, O, Q>(
&self,
url: &str,
query: Option<&Q>,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
Q: Serialize + ?Sized,
sourcepub async fn get_no_query<'a, R, O>(
&self,
url: &str,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
pub async fn get_no_query<'a, R, O>(
&self,
url: &str,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
sourcepub async fn post<'a, R, O, B>(
&self,
url: &str,
body: Option<B>,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Successful, RequestError<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::BuildError, <<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Unsuccessful>>
pub async fn post<'a, R, O, B>( &self, url: &str, body: Option<B>, options: impl IntoIterator<Item = O> ) -> Result<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Successful, RequestError<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::BuildError, <<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Unsuccessful>>
sourcepub async fn post_no_body<'a, R, O>(
&self,
url: &str,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
pub async fn post_no_body<'a, R, O>(
&self,
url: &str,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
sourcepub async fn put<'a, R, O, B>(
&self,
url: &str,
body: Option<B>,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Successful, RequestError<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::BuildError, <<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Unsuccessful>>
pub async fn put<'a, R, O, B>( &self, url: &str, body: Option<B>, options: impl IntoIterator<Item = O> ) -> Result<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Successful, RequestError<<<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::BuildError, <<O as HttpOption<'a, R, B>>::RequestHandler as RequestHandler<B>>::Unsuccessful>>
sourcepub async fn put_no_body<'a, R, O>(
&self,
url: &str,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
pub async fn put_no_body<'a, R, O>(
&self,
url: &str,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
sourcepub async fn delete<'a, R, O, Q>(
&self,
url: &str,
query: Option<&Q>,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
Q: Serialize + ?Sized,
pub async fn delete<'a, R, O, Q>(
&self,
url: &str,
query: Option<&Q>,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
Q: Serialize + ?Sized,
sourcepub async fn delete_no_query<'a, R, O>(
&self,
url: &str,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
pub async fn delete_no_query<'a, R, O>(
&self,
url: &str,
options: impl IntoIterator<Item = O>
) -> Result<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Successful, RequestError<<<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::BuildError, <<O as HttpOption<'a, R, ()>>::RequestHandler as RequestHandler<()>>::Unsuccessful>>where
O: HttpOption<'a, R, ()>,
O::RequestHandler: RequestHandler<()>,
Self: GetOptions<O::Options>,
pub async fn websocket<O, H>( &self, url: &str, handler: H, options: impl IntoIterator<Item = O> ) -> Result<WebSocketConnection<O::WebSocketHandler>, TungsteniteError>
Trait Implementations§
source§impl GetOptions<BinanceOptions> for Client
Available on crate feature binance
only.
impl GetOptions<BinanceOptions> for Client
Available on crate feature
binance
only.fn default_options(&self) -> &BinanceOptions
fn default_options_mut(&mut self) -> &mut BinanceOptions
source§impl GetOptions<BitFlyerOptions> for Client
Available on crate feature bitflyer
only.
impl GetOptions<BitFlyerOptions> for Client
Available on crate feature
bitflyer
only.fn default_options(&self) -> &BitFlyerOptions
fn default_options_mut(&mut self) -> &mut BitFlyerOptions
source§impl GetOptions<BybitOptions> for Client
Available on crate feature bybit
only.
impl GetOptions<BybitOptions> for Client
Available on crate feature
bybit
only.fn default_options(&self) -> &BybitOptions
fn default_options_mut(&mut self) -> &mut BybitOptions
source§impl GetOptions<CoincheckOptions> for Client
Available on crate feature coincheck
only.
impl GetOptions<CoincheckOptions> for Client
Available on crate feature
coincheck
only.fn default_options(&self) -> &CoincheckOptions
fn default_options_mut(&mut self) -> &mut CoincheckOptions
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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