pub struct ContrastAnalysis {
pub min_ratio: f32,
pub max_ratio: f32,
pub avg_ratio: f32,
pub pairs_analyzed: usize,
pub failing_pairs: Vec<ContrastPair>,
pub passes_wcag_aa: bool,
}Expand description
Results of a contrast analysis
Fields§
§min_ratio: f32Minimum contrast ratio found
max_ratio: f32Maximum contrast ratio found
avg_ratio: f32Average contrast ratio
pairs_analyzed: usizeNumber of color pairs analyzed
failing_pairs: Vec<ContrastPair>Color pairs that fail WCAG AA
passes_wcag_aa: boolWhether the analysis passes WCAG AA
Implementations§
Trait Implementations§
Source§impl Clone for ContrastAnalysis
impl Clone for ContrastAnalysis
Source§fn clone(&self) -> ContrastAnalysis
fn clone(&self) -> ContrastAnalysis
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 moreAuto Trait Implementations§
impl Freeze for ContrastAnalysis
impl RefUnwindSafe for ContrastAnalysis
impl Send for ContrastAnalysis
impl Sync for ContrastAnalysis
impl Unpin for ContrastAnalysis
impl UnsafeUnpin for ContrastAnalysis
impl UnwindSafe for ContrastAnalysis
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