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 Op
eration.
The individual Op
eration 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
Natural
The natural numbers + zero (𝐍₀ or 𝐖 in math terms)
Integer
Integers (𝐙 in math terms)
Real
Reals (𝐑 in math terms)
Series
A series of reals (𝐑ⁿ in math terms)
Text
Any kind of text
Texts
Any set of comma-separated texts
Trait Implementations§
source§impl Clone for OpParameter
impl Clone for OpParameter
source§fn clone(&self) -> OpParameter
fn clone(&self) -> OpParameter
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OpParameter
impl Debug for OpParameter
source§impl PartialEq for OpParameter
impl PartialEq for OpParameter
source§fn eq(&self, other: &OpParameter) -> bool
fn eq(&self, other: &OpParameter) -> bool
self
and other
values to be equal, and is used
by ==
.