pub trait HttpHandler: Send + Sync {
// Required methods
fn get(&self, url: &str, responder: HttpResponder);
fn get_range(
&self,
url: &str,
start: u64,
end: u64,
responder: HttpResponder,
);
// Provided method
fn capabilities(&self) -> u32 { ... }
}Expand description
An HTTP client the library uses to fetch CDN data.
Both methods are asynchronous: reply through the HttpResponder when
the request finishes, from whichever thread you like. Replying
synchronously inside the method is also fine.
Required Methods§
fn get(&self, url: &str, responder: HttpResponder)
Provided Methods§
fn capabilities(&self) -> u32
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".