pub trait LoopbackFetch: Send + Sync {
// Required method
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
max_bytes: usize,
timeout_secs: u64,
) -> Pin<Box<dyn Future<Output = FetchResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Unauthenticated loopback GET against the server’s own origin. The server injects a reqwest-backed implementation that reuses its vetted HTTP client + SSRF posture; tests inject an in-memory mock.
Required Methods§
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
max_bytes: usize,
timeout_secs: u64,
) -> Pin<Box<dyn Future<Output = FetchResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
max_bytes: usize,
timeout_secs: u64,
) -> Pin<Box<dyn Future<Output = FetchResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
GET url with no credentials, bounding the body to max_bytes
and the request to timeout_secs.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".