pub trait Request: Send + Sync {
type Response: Response;
// Required methods
fn new() -> Self
where Self: Sized;
fn get(
&self,
url: &str,
) -> impl Future<Output = Result<Self::Response>> + Send;
fn post(
&self,
url: &str,
body: &str,
) -> impl Future<Output = Result<Self::Response>> + Send;
}Expand description
Trait for HTTP clients that can make requests to the polygon.io API.
Implement this trait to use custom HTTP clients with the polygon.io client.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.