pub trait UsageTransport {
// Required method
fn get(
&self,
url: &str,
token: &str,
timeout: Duration,
) -> Result<HttpResponse>;
}Expand description
Injected HTTP surface. UreqTransport is the default; tests use
a fake to exercise status-handling paths without real I/O. Errors
carry io::ErrorKind::TimedOut for timeouts; anything else is
treated as a generic network failure in fetch_usage.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".