oxiproj-core 0.1.2

Foundation types for OxiProj: coordinates, errors, ellipsoids, datums, and units.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![forbid(unsafe_code)]
//! `GridRegistry` — name-keyed store of raw grid file bytes.
//!
//! Defined here (in `oxiproj-core`) so that `oxiproj-grids` can implement it
//! without creating a circular dependency with `oxiproj-transformations`
//! (which depends on `oxiproj-grids`).

/// A registry of raw grid file bytes indexed by name.
///
/// Implementors include:
/// - `oxiproj_engine::Context` (in-memory, per-session)
/// - `oxiproj_grids::resolver::LoadedGridRegistry` (pre-loaded from disk/CDN)
pub trait GridRegistry: Send + Sync {
    /// Return the raw bytes of a named grid, or `None` if not registered.
    fn get_grid(&self, name: &str) -> Option<&[u8]>;
}