pub trait ElevationSource: Send + Sync {
// Required methods
fn request(&self, id: TileId);
fn poll(&self) -> Vec<(TileId, Result<ElevationGrid, TerrainError>)>;
// Provided methods
fn cancel(&self, _id: TileId) -> bool { ... }
fn diagnostics(&self) -> Option<ElevationSourceDiagnostics> { ... }
}Expand description
A source of elevation data for terrain tiles.
Same polling pattern as TileSource: the engine does not own an
async runtime.
Required Methods§
Sourcefn poll(&self) -> Vec<(TileId, Result<ElevationGrid, TerrainError>)>
fn poll(&self) -> Vec<(TileId, Result<ElevationGrid, TerrainError>)>
Poll for completed elevation fetches.
Provided Methods§
Sourcefn cancel(&self, _id: TileId) -> bool
fn cancel(&self, _id: TileId) -> bool
Cancel a queued request for a terrain tile if it has not yet been sent.
Returns true if the source found and removed a queued request.
In-flight requests are unaffected and return false.
Sourcefn diagnostics(&self) -> Option<ElevationSourceDiagnostics>
fn diagnostics(&self) -> Option<ElevationSourceDiagnostics>
Optional source diagnostics for debugging terrain fetch/decode behavior.