Skip to main content

UiBundleFetcher

Trait UiBundleFetcher 

Source
pub trait UiBundleFetcher: Send + Sync {
    // Required method
    fn fetch_bytes(&self, url: &str) -> Result<Vec<u8>>;
}
Expand description

Abstraction over the network layer so tests can inject a fake without making real HTTP calls.

Required Methods§

Source

fn fetch_bytes(&self, url: &str) -> Result<Vec<u8>>

Fetch the URL and return the raw response bytes. Returns an io::Error on any network or HTTP-level failure.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§