#[repr(C, u8)]pub enum CssPropertyValue<T> {
Auto,
None,
Initial,
Inherit,
Exact(T),
}Variants§
Implementations§
Source§impl<T: PrintAsCssValue> CssPropertyValue<T>
impl<T: PrintAsCssValue> CssPropertyValue<T>
pub fn get_css_value_fmt(&self) -> String
Source§impl<T> CssPropertyValue<T>
impl<T> CssPropertyValue<T>
Sourcepub fn map_property<F: Fn(T) -> U, U>(self, map_fn: F) -> CssPropertyValue<U>
pub fn map_property<F: Fn(T) -> U, U>(self, map_fn: F) -> CssPropertyValue<U>
Transforms a CssPropertyValue<T> into a CssPropertyValue<U> by applying a mapping
function
pub fn get_property(&self) -> Option<&T>
pub fn get_property_owned(self) -> Option<T>
pub fn is_auto(&self) -> bool
pub fn is_none(&self) -> bool
pub fn is_initial(&self) -> bool
pub fn is_inherit(&self) -> bool
Source§impl<T: Default> CssPropertyValue<T>
impl<T: Default> CssPropertyValue<T>
pub fn get_property_or_default(self) -> Option<T>
Source§impl CssPropertyValue<StyleBorderTopLeftRadius>
impl CssPropertyValue<StyleBorderTopLeftRadius>
pub fn scale_for_dpi(&mut self, scale_factor: f32)
Source§impl CssPropertyValue<StyleBorderTopRightRadius>
impl CssPropertyValue<StyleBorderTopRightRadius>
pub fn scale_for_dpi(&mut self, scale_factor: f32)
Source§impl CssPropertyValue<StyleBorderBottomLeftRadius>
impl CssPropertyValue<StyleBorderBottomLeftRadius>
pub fn scale_for_dpi(&mut self, scale_factor: f32)
Source§impl CssPropertyValue<StyleBorderBottomRightRadius>
impl CssPropertyValue<StyleBorderBottomRightRadius>
pub fn scale_for_dpi(&mut self, scale_factor: f32)
Source§impl CssPropertyValue<LayoutBorderTopWidth>
impl CssPropertyValue<LayoutBorderTopWidth>
pub fn scale_for_dpi(&mut self, scale_factor: f32)
Source§impl CssPropertyValue<LayoutBorderRightWidth>
impl CssPropertyValue<LayoutBorderRightWidth>
pub fn scale_for_dpi(&mut self, scale_factor: f32)
Source§impl CssPropertyValue<LayoutBorderBottomWidth>
impl CssPropertyValue<LayoutBorderBottomWidth>
pub fn scale_for_dpi(&mut self, scale_factor: f32)
Source§impl CssPropertyValue<LayoutBorderLeftWidth>
impl CssPropertyValue<LayoutBorderLeftWidth>
pub fn scale_for_dpi(&mut self, scale_factor: f32)
Trait Implementations§
Source§impl<T: Clone> Clone for CssPropertyValue<T>
impl<T: Clone> Clone for CssPropertyValue<T>
Source§fn clone(&self) -> CssPropertyValue<T>
fn clone(&self) -> CssPropertyValue<T>
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<T: Debug> Debug for CssPropertyValue<T>
impl<T: Debug> Debug for CssPropertyValue<T>
Source§impl<T: Default> Default for CssPropertyValue<T>
impl<T: Default> Default for CssPropertyValue<T>
Source§impl<T: Display> Display for CssPropertyValue<T>
impl<T: Display> Display for CssPropertyValue<T>
Source§impl<T> From<T> for CssPropertyValue<T>
impl<T> From<T> for CssPropertyValue<T>
Source§impl<T: Hash> Hash for CssPropertyValue<T>
impl<T: Hash> Hash for CssPropertyValue<T>
Source§impl<T: Ord> Ord for CssPropertyValue<T>
impl<T: Ord> Ord for CssPropertyValue<T>
Source§fn cmp(&self, other: &CssPropertyValue<T>) -> Ordering
fn cmp(&self, other: &CssPropertyValue<T>) -> 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<T: PartialEq> PartialEq for CssPropertyValue<T>
impl<T: PartialEq> PartialEq for CssPropertyValue<T>
Source§impl<T: PartialOrd> PartialOrd for CssPropertyValue<T>
impl<T: PartialOrd> PartialOrd for CssPropertyValue<T>
impl<T: Copy> Copy for CssPropertyValue<T>
impl<T: Eq> Eq for CssPropertyValue<T>
impl<T> StructuralPartialEq for CssPropertyValue<T>
Auto Trait Implementations§
impl<T> Freeze for CssPropertyValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for CssPropertyValue<T>where
T: RefUnwindSafe,
impl<T> Send for CssPropertyValue<T>where
T: Send,
impl<T> Sync for CssPropertyValue<T>where
T: Sync,
impl<T> Unpin for CssPropertyValue<T>where
T: Unpin,
impl<T> UnwindSafe for CssPropertyValue<T>where
T: UnwindSafe,
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