pub struct ContrastWarning {
pub pair: (&'static str, &'static str),
pub ratio: f64,
pub required: f64,
pub level: WcagLevel,
}Expand description
A contrast warning for a foreground/background colour pair.
Fields§
§pair: (&'static str, &'static str)Names of the foreground and background roles.
ratio: f64Actual contrast ratio.
required: f64Minimum required contrast for the failing level.
level: WcagLevelThe WCAG level that this pair fails.
Trait Implementations§
Source§impl Clone for ContrastWarning
impl Clone for ContrastWarning
Source§fn clone(&self) -> ContrastWarning
fn clone(&self) -> ContrastWarning
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContrastWarning
impl Debug for ContrastWarning
Source§impl PartialEq for ContrastWarning
impl PartialEq for ContrastWarning
Source§fn eq(&self, other: &ContrastWarning) -> bool
fn eq(&self, other: &ContrastWarning) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContrastWarning
Auto Trait Implementations§
impl Freeze for ContrastWarning
impl RefUnwindSafe for ContrastWarning
impl Send for ContrastWarning
impl Sync for ContrastWarning
impl Unpin for ContrastWarning
impl UnsafeUnpin for ContrastWarning
impl UnwindSafe for ContrastWarning
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