#[non_exhaustive]pub enum AlphaMapping {
Undeclared,
Linear {
domain: [f64; 2],
range: [f64; 2],
},
Log10 {
domain: [f64; 2],
range: [f64; 2],
},
Continuous {
domain: [f64; 2],
evaluated: Vec<(f64, f64)>,
},
Categorical(Vec<(RawKey, f64)>),
Threshold {
boundaries: Vec<f64>,
alphas: Vec<f64>,
},
}Expand description
The exact authored opacity mapping, materialized once at binding time. Coefficients are finite values in [0, 1] in an owned AlphaValues declaration.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Undeclared
Direct coefficients have no additional mapping.
Linear
Clamped linear mapping.
Log10
Clamped logarithmic mapping with base 10.
Continuous
A complete evaluated custom continuous declaration.
Fields
Categorical(Vec<(RawKey, f64)>)
First-observed raw categories and their mapped coefficients.
Threshold
An ordered threshold mapping, with equality belonging to the right interval.
Trait Implementations§
Source§impl Clone for AlphaMapping
impl Clone for AlphaMapping
Source§impl Debug for AlphaMapping
impl Debug for AlphaMapping
Source§impl Default for AlphaMapping
impl Default for AlphaMapping
Auto Trait Implementations§
impl Forget for AlphaMapping
impl Freeze for AlphaMappingwhere
*const u8 is !null: Freeze,
PhantomData<(f64, f64)>: Freeze,
PhantomData<(RawKey, f64)>: Freeze,
PhantomData<f64>: Freeze,
impl Move for AlphaMapping
impl RefUnwindSafe for AlphaMapping
impl Send for AlphaMapping
impl Sync for AlphaMapping
impl Unpin for AlphaMapping
impl UnsafeUnpin for AlphaMappingwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(f64, f64)>: UnsafeUnpin,
PhantomData<(RawKey, f64)>: UnsafeUnpin,
PhantomData<f64>: UnsafeUnpin,
impl UnwindSafe for AlphaMappingwhere
RawVecInner: UnwindSafe,
Arc<[u8]>: UnwindSafe,
BoxRaw<RawKey>: UnwindSafe,
Arc<str>: UnwindSafe,
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
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<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.