pub struct HttpElevationSource { /* private fields */ }Expand description
An ElevationSource that fetches Terrain-RGB tiles over HTTP.
Implementations§
Source§impl HttpElevationSource
impl HttpElevationSource
Sourcepub fn new(
url_template: impl Into<String>,
client: Box<dyn HttpClient>,
encoding: TerrainRgbEncoding,
) -> Self
pub fn new( url_template: impl Into<String>, client: Box<dyn HttpClient>, encoding: TerrainRgbEncoding, ) -> Self
Create a new HTTP elevation source.
§Arguments
url_template- URL with{z},{x},{y}placeholders.client- The HTTP transport provided by the host application.encoding- How to decode RGB pixels into elevation values.
Sourcepub fn with_decoder(
url_template: impl Into<String>,
client: Box<dyn HttpClient>,
encoding: TerrainRgbEncoding,
decoder: Box<dyn TileDecoder>,
) -> Self
pub fn with_decoder( url_template: impl Into<String>, client: Box<dyn HttpClient>, encoding: TerrainRgbEncoding, decoder: Box<dyn TileDecoder>, ) -> Self
Create with a TileDecoder for decoding PNG/JPEG response
bodies into RGBA8 pixel data before Terrain-RGB decode.
Sourcepub fn with_max_concurrent_requests(self, max_concurrent: usize) -> Self
pub fn with_max_concurrent_requests(self, max_concurrent: usize) -> Self
Override the maximum number of concurrent terrain HTTP requests.
Trait Implementations§
Source§impl Debug for HttpElevationSource
impl Debug for HttpElevationSource
Source§impl ElevationSource for HttpElevationSource
impl ElevationSource for HttpElevationSource
Source§fn poll(&self) -> Vec<(TileId, Result<ElevationGrid, TerrainError>)>
fn poll(&self) -> Vec<(TileId, Result<ElevationGrid, TerrainError>)>
Poll for completed elevation fetches.
Source§fn diagnostics(&self) -> Option<ElevationSourceDiagnostics>
fn diagnostics(&self) -> Option<ElevationSourceDiagnostics>
Optional source diagnostics for debugging terrain fetch/decode behavior.
Auto Trait Implementations§
impl !Freeze for HttpElevationSource
impl !RefUnwindSafe for HttpElevationSource
impl Send for HttpElevationSource
impl Sync for HttpElevationSource
impl Unpin for HttpElevationSource
impl UnsafeUnpin for HttpElevationSource
impl !UnwindSafe for HttpElevationSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more