#[non_exhaustive]pub struct PerceptValues {
pub hue: f64,
pub size: f64,
pub border: f64,
pub opacity: f64,
pub clarity: Option<f64>,
}Expand description
Visual encoding values computed by the eval pipeline.
Each field corresponds to a percept channel. The hue, size, border,
and opacity channels are always present. The clarity channel is only
present when coverage data is available.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.hue: f64Hue channel value (mapped from cyclomatic complexity by default).
size: f64Size channel value (mapped from lines by default).
border: f64Border channel value (mapped from params by default).
opacity: f64Opacity channel value (mapped from depth by default).
clarity: Option<f64>Clarity channel value (mapped from coverage when available).
Implementations§
Source§impl PerceptValues
impl PerceptValues
Sourcepub fn new(hue: f64, size: f64, border: f64, opacity: f64) -> Self
pub fn new(hue: f64, size: f64, border: f64, opacity: f64) -> Self
Create a new PerceptValues with the four core channels.
Sourcepub fn with_clarity(
hue: f64,
size: f64,
border: f64,
opacity: f64,
clarity: f64,
) -> Self
pub fn with_clarity( hue: f64, size: f64, border: f64, opacity: f64, clarity: f64, ) -> Self
Create a new PerceptValues with all channels including clarity.
Trait Implementations§
Source§impl Clone for PerceptValues
impl Clone for PerceptValues
Source§fn clone(&self) -> PerceptValues
fn clone(&self) -> PerceptValues
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 Debug for PerceptValues
impl Debug for PerceptValues
Source§impl Default for PerceptValues
impl Default for PerceptValues
Source§impl<'de> Deserialize<'de> for PerceptValues
impl<'de> Deserialize<'de> for PerceptValues
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PerceptValues
impl PartialEq for PerceptValues
Source§impl Serialize for PerceptValues
impl Serialize for PerceptValues
impl StructuralPartialEq for PerceptValues
Auto Trait Implementations§
impl Freeze for PerceptValues
impl RefUnwindSafe for PerceptValues
impl Send for PerceptValues
impl Sync for PerceptValues
impl Unpin for PerceptValues
impl UnsafeUnpin for PerceptValues
impl UnwindSafe for PerceptValues
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