pub enum UniformNestedValue<C, V> {
Category(C),
Value(C, V),
}
Expand description
Like plotters::coord::combinators::NestedValue
, but for
Variants§
Category(C)
Caregory value - outer coordinate system only!
Primarily used for rendering key points, and avoids issues when the inner coordinate system might not produce key points in the correct location.
Value(C, V)
Exact value - typically, this is what you’d actually use when providing values.
Implementations§
Source§impl<C, V> UniformNestedValue<C, V>
impl<C, V> UniformNestedValue<C, V>
Sourcepub fn category(&self) -> &C
pub fn category(&self) -> &C
Obtain the category of this uniform nested value.
Analogous to plotters::coord::combinators::NestedValue::category
Sourcepub fn nested_value(&self) -> Option<&V>
pub fn nested_value(&self) -> Option<&V>
Obtain the nested value of this, if it is a value that actually refers to a single, concrete nested value.
Analogous to plotters::coord::combinators::NestedValue::nested_value
Sourcepub fn maybe_into_tuple(self) -> Option<(C, V)>
pub fn maybe_into_tuple(self) -> Option<(C, V)>
Turn this into a tuple, if it is UniformNestedValue::Value
Trait Implementations§
Source§impl<C: Clone, V: Clone> Clone for UniformNestedValue<C, V>
impl<C: Clone, V: Clone> Clone for UniformNestedValue<C, V>
Source§fn clone(&self) -> UniformNestedValue<C, V>
fn clone(&self) -> UniformNestedValue<C, V>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<C, V> From<(C, V)> for UniformNestedValue<C, V>
impl<C, V> From<(C, V)> for UniformNestedValue<C, V>
impl<C: Eq, V: Eq> Eq for UniformNestedValue<C, V>
impl<C, V> StructuralPartialEq for UniformNestedValue<C, V>
Auto Trait Implementations§
impl<C, V> Freeze for UniformNestedValue<C, V>
impl<C, V> RefUnwindSafe for UniformNestedValue<C, V>where
C: RefUnwindSafe,
V: RefUnwindSafe,
impl<C, V> Send for UniformNestedValue<C, V>
impl<C, V> Sync for UniformNestedValue<C, V>
impl<C, V> Unpin for UniformNestedValue<C, V>
impl<C, V> UnwindSafe for UniformNestedValue<C, V>where
C: UnwindSafe,
V: 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