pub struct AttrExpression {
pub attribute_lower_case_name: String,
pub type_or_unit: TypeOrUnit,
pub default_value_css: Option<String>,
pub is_not_in_page_rule: bool,
}
Fields§
§attribute_lower_case_name: String
§type_or_unit: TypeOrUnit
§default_value_css: Option<String>
§is_not_in_page_rule: bool
Implementations§
Source§impl AttrExpression
impl AttrExpression
pub fn to_unit<U: Unit, Conversion: AttributeConversion<U>>( &self, conversion: &Conversion, ) -> Option<U>
Trait Implementations§
Source§impl Clone for AttrExpression
impl Clone for AttrExpression
Source§fn clone(&self) -> AttrExpression
fn clone(&self) -> AttrExpression
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 AttrExpression
impl Debug for AttrExpression
Source§impl<U: Unit> Expression<U> for AttrExpression
impl<U: Unit> Expression<U> for AttrExpression
Source§fn evaluate<Conversion: FontRelativeLengthConversion<U::Number> + ViewportPercentageLengthConversion<U::Number> + PercentageConversion<U::Number> + AttributeConversion<U> + CssVariableConversion>(
&self,
conversion: &Conversion,
) -> Option<U::Number>
fn evaluate<Conversion: FontRelativeLengthConversion<U::Number> + ViewportPercentageLengthConversion<U::Number> + PercentageConversion<U::Number> + AttributeConversion<U> + CssVariableConversion>( &self, conversion: &Conversion, ) -> Option<U::Number>
Division by zero is handled by returning the maximum possible f32 value Subtractions for UnsignedCssNumber that are negative are handled by returning 0.0
Source§impl Hash for AttrExpression
impl Hash for AttrExpression
Source§impl Ord for AttrExpression
impl Ord for AttrExpression
Source§fn cmp(&self, other: &AttrExpression) -> Ordering
fn cmp(&self, other: &AttrExpression) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AttrExpression
impl PartialEq for AttrExpression
Source§impl PartialOrd for AttrExpression
impl PartialOrd for AttrExpression
Source§impl ToCss for AttrExpression
impl ToCss for AttrExpression
impl Eq for AttrExpression
impl StructuralPartialEq for AttrExpression
Auto Trait Implementations§
impl Freeze for AttrExpression
impl RefUnwindSafe for AttrExpression
impl Send for AttrExpression
impl Sync for AttrExpression
impl Unpin for AttrExpression
impl UnwindSafe for AttrExpression
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