Skip to main content

Crate v_exchanges_api_generics

Crate v_exchanges_api_generics 

Source
Expand description

§Generic-API-Client

This is a crate for interacting with HTTP/HTTPS/WebSocket APIs. It is named “generic” because you can use the same client to interact with multiple different APIs with, different authentication methods, data formats etc.

This crate provides

  • Client A HTTP/HTTPS client
  • [WebSocketConnection][websocket::WebSocketConnection] A struct to manage WebSocket connections
  • RequestHandler A trait for implementing features like authentication on your requests
  • [WebSocketHandler][websocket::WebSocketHandler] A trait that is used to handle messages etc.. for a WebSocket Connection.

For a more detailed documentation, see the links above.

Re-exports§

pub extern crate reqwest;
pub extern crate tokio_tungstenite;
pub use ratelimiter::RateLimiter;
pub use ratelimiter::quota::Quota;
pub use retry::ExponentialBackoff;
pub use retry::RetryConfig;
pub use retry::RetryManager;

Modules§

http
ratelimiter
A rate limiter implementation heavily inspired by governor.
retry
Generic retry mechanism for network operations.
ws

Enums§

ConstructAuthError
UrlError