Skip to main content

TileFetcher

Trait TileFetcher 

Source
pub trait TileFetcher: Sync {
    // Required method
    fn fetch(&self, url: &str) -> Result<FetchOutcome, GeolithError>;
}
Expand description

A tile HTTP client. Trait-shaped so tests can stub responses.

Required Methods§

Source

fn fetch(&self, url: &str) -> Result<FetchOutcome, GeolithError>

Fetch one URL.

§Errors

Returns an error for network failures and non-2xx/404 statuses.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§