Struct geodesy::Minimal

source ·
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

source§

fn get_grid(&self, _name: &str) -> Result<Arc<dyn Grid>, Error>

Access grid resources by identifier

source§

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>

Instantiate the operation given by definition
source§

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>

Globally defined default values (typically just ellps=GRS80)
source§

fn steps(&self, op: OpHandle) -> Result<&Vec<String>, Error>

Definitions of steps
source§

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)

Register a new user-defined operator
source§

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)

Register a new user-defined resource (macro, ellipsoid parameter set…)
source§

fn get_resource(&self, name: &str) -> Result<String, Error>

Helper for the Op instantiation logic in Op::op(...)
source§

fn get_blob(&self, name: &str) -> Result<Vec<u8>, Error>

Access blob-like resources by identifier
source§

impl Debug for Minimal

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Minimal

source§

fn default() -> Minimal

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CoordinateMetadata for T
where T: ?Sized,

source§

fn crs_id(&self) -> Option<MdIdentifier>

source§

fn crs(&self) -> Option<Crs>

source§

fn coordinate_epoch(&self) -> Option<DataEpoch>

source§

fn is_valid(&self) -> bool

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.