Enum geodesy::OpParameter

source ·
pub enum OpParameter {
    Flag {
        key: &'static str,
    },
    Natural {
        key: &'static str,
        default: Option<usize>,
    },
    Integer {
        key: &'static str,
        default: Option<i64>,
    },
    Real {
        key: &'static str,
        default: Option<f64>,
    },
    Series {
        key: &'static str,
        default: Option<&'static str>,
    },
    Text {
        key: &'static str,
        default: Option<&'static str>,
    },
    Texts {
        key: &'static str,
        default: Option<&'static str>,
    },
}
Expand description

The OpParameter enumeration is used to represent which defining parameters are valid for a given Operation.

The individual Operation implementations use these to define the types of the parameters accepted, and whether they are required (in which case the provided default value is set to None), or optional (in which case, a default value of the proper type is provided). The odd man out here is the Flag type: Since a flag is a boolean which is true if present and false if not, it does not make much sense to provide a default in this case.

Any other parameters given should be ignored, but warned about.

For a given operation, the union of the sets of its required and optional parameters is called the gamut of the operation.

Variants§

§

Flag

A flag is a boolean that is true if present, false if not

Fields

§key: &'static str
§

Natural

The natural numbers + zero (𝐍₀ or 𝐖 in math terms)

Fields

§key: &'static str
§default: Option<usize>
§

Integer

Integers (𝐙 in math terms)

Fields

§key: &'static str
§default: Option<i64>
§

Real

Reals (𝐑 in math terms)

Fields

§key: &'static str
§default: Option<f64>
§

Series

A series of reals (𝐑ⁿ in math terms)

Fields

§key: &'static str
§default: Option<&'static str>
§

Text

Any kind of text

Fields

§key: &'static str
§default: Option<&'static str>
§

Texts

Any set of comma-separated texts

Fields

§key: &'static str
§default: Option<&'static str>

Trait Implementations§

source§

impl Clone for OpParameter

source§

fn clone(&self) -> OpParameter

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for OpParameter

source§

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

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

impl PartialEq for OpParameter

source§

fn eq(&self, other: &OpParameter) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for OpParameter

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.