pub struct ContrastViolation {
pub widget_id: WidgetId,
pub actual_ratio: f64,
pub required_ratio: f64,
pub context: String,
}Expand description
A contrast violation for a widget.
Fields§
§widget_id: WidgetIdWidget with insufficient contrast.
actual_ratio: f64Measured contrast ratio.
required_ratio: f64Required contrast ratio.
context: StringHuman-readable description of the violation context.
Trait Implementations§
Source§impl Clone for ContrastViolation
impl Clone for ContrastViolation
Source§fn clone(&self) -> ContrastViolation
fn clone(&self) -> ContrastViolation
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 ContrastViolation
impl Debug for ContrastViolation
Source§impl<'de> Deserialize<'de> for ContrastViolation
impl<'de> Deserialize<'de> for ContrastViolation
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 JsonSchema for ContrastViolation
impl JsonSchema for ContrastViolation
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ContrastViolation
impl PartialEq for ContrastViolation
Source§fn eq(&self, other: &ContrastViolation) -> bool
fn eq(&self, other: &ContrastViolation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ContrastViolation
impl Serialize for ContrastViolation
impl StructuralPartialEq for ContrastViolation
Auto Trait Implementations§
impl Freeze for ContrastViolation
impl RefUnwindSafe for ContrastViolation
impl Send for ContrastViolation
impl Sync for ContrastViolation
impl Unpin for ContrastViolation
impl UnsafeUnpin for ContrastViolation
impl UnwindSafe for ContrastViolation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> ElicitJson for T
impl<T> ElicitJson for T
Source§async fn elicit_json<C>(communicator: &C) -> Result<T, ElicitError>where
C: ElicitCommunicator,
async fn elicit_json<C>(communicator: &C) -> Result<T, ElicitError>where
C: ElicitCommunicator,
Elicit a value by presenting the JSON schema and parsing the response.