#[repr(u8)]pub enum ScaleTier {
MillimeterDefault = 0,
Nanometer = 1,
Micrometer = 2,
Meter = 3,
Kilometer = 4,
Megameter = 5,
Astronomical = 6,
Parsec = 7,
}Expand description
Scale tier for multi-scale spatial coordinate packing (§2.3)
Variants§
MillimeterDefault = 0
1 mm (10^-3 m) per LSB — backward-compatible legacy default
Nanometer = 1
10^-9 m
Micrometer = 2
10^-6 m
Meter = 3
10^0 m (1 meter)
Kilometer = 4
10^3 m (1 kilometer)
Megameter = 5
10^6 m (1 megameter)
Astronomical = 6
10^9 m (1 gigameter / astronomical)
Parsec = 7
10^12 m (1 terameter / parsec tier)
Implementations§
Source§impl ScaleTier
impl ScaleTier
Sourcepub fn from_canonical_exponent_tier(s: u8) -> Self
pub fn from_canonical_exponent_tier(s: u8) -> Self
Map canonical scale tier exponent S in [0..7] (step = 10^(3*S - 9)) to ScaleTier.
Sourcepub fn step_meters(self) -> f64
pub fn step_meters(self) -> f64
Metric step in meters per LSB.
Trait Implementations§
impl Copy for ScaleTier
impl Eq for ScaleTier
Source§impl Ord for ScaleTier
impl Ord for ScaleTier
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for ScaleTier
impl PartialOrd for ScaleTier
impl StructuralPartialEq for ScaleTier
Auto Trait Implementations§
impl Freeze for ScaleTier
impl RefUnwindSafe for ScaleTier
impl Send for ScaleTier
impl Sync for ScaleTier
impl Unpin for ScaleTier
impl UnsafeUnpin for ScaleTier
impl UnwindSafe for ScaleTier
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.