pub struct Minimal { /* private fields */ }
Expand description
A minimalistic context provider, supporting only built in and run-time defined operators. Usually sufficient for cartographic uses, and for internal test authoring.
Trait Implementations§
source§impl Context for Minimal
impl Context for Minimal
source§fn get_grid(&self, _name: &str) -> Result<Arc<dyn Grid>, Error>
fn get_grid(&self, _name: &str) -> Result<Arc<dyn Grid>, Error>
Access grid resources by identifier
source§fn new() -> Minimal
fn new() -> Minimal
In general, implementations should make sure that
new
differs from default
only by adding access to the builtin adaptors (geo:in
, gis:out
etc.)source§fn op(&mut self, definition: &str) -> Result<OpHandle, Error>
fn op(&mut self, definition: &str) -> Result<OpHandle, Error>
Instantiate the operation given by
definition
source§fn apply(
&self,
op: OpHandle,
direction: Direction,
operands: &mut dyn CoordinateSet
) -> Result<usize, Error>
fn apply( &self, op: OpHandle, direction: Direction, operands: &mut dyn CoordinateSet ) -> Result<usize, Error>
Apply operation
op
to operands
source§fn globals(&self) -> BTreeMap<String, String>
fn globals(&self) -> BTreeMap<String, String>
Globally defined default values (typically just
ellps=GRS80
)source§fn params(&self, op: OpHandle, index: usize) -> Result<ParsedParameters, Error>
fn params(&self, op: OpHandle, index: usize) -> Result<ParsedParameters, Error>
Parsed parameters of a specific step
source§fn register_op(&mut self, name: &str, constructor: OpConstructor)
fn register_op(&mut self, name: &str, constructor: OpConstructor)
Register a new user-defined operator
source§fn get_op(&self, name: &str) -> Result<OpConstructor, Error>
fn get_op(&self, name: &str) -> Result<OpConstructor, Error>
Helper for the
Op
instantiation logic in Op::op(...)
source§fn register_resource(&mut self, name: &str, definition: &str)
fn register_resource(&mut self, name: &str, definition: &str)
Register a new user-defined resource (macro, ellipsoid parameter set…)
Auto Trait Implementations§
impl Freeze for Minimal
impl !RefUnwindSafe for Minimal
impl Send for Minimal
impl Sync for Minimal
impl Unpin for Minimal
impl !UnwindSafe for Minimal
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