#[repr(C, u8)]pub enum StyleAspectRatio {
Auto,
Ratio(AspectRatioValue),
}Expand description
CSS aspect-ratio property: preferred aspect ratio for the box.
CSS Box Sizing Level 4 §6 — values: auto | <ratio> (initial: auto)
Stored as width/height ratio. Auto means no preferred ratio.
Variants§
Auto
No preferred aspect ratio
Ratio(AspectRatioValue)
Fixed ratio (width / height), stored as fixed-point (value * 1000)
Trait Implementations§
Source§impl Clone for StyleAspectRatio
impl Clone for StyleAspectRatio
Source§fn clone(&self) -> StyleAspectRatio
fn clone(&self) -> StyleAspectRatio
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 StyleAspectRatio
impl Debug for StyleAspectRatio
Source§impl Default for StyleAspectRatio
impl Default for StyleAspectRatio
Source§fn default() -> StyleAspectRatio
fn default() -> StyleAspectRatio
Returns the “default value” for a type. Read more
Source§impl FormatAsRustCode for StyleAspectRatio
impl FormatAsRustCode for StyleAspectRatio
fn format_as_rust_code(&self, _tabs: usize) -> String
Source§impl From<StyleAspectRatio> for CssProperty
impl From<StyleAspectRatio> for CssProperty
Source§fn from(e: StyleAspectRatio) -> Self
fn from(e: StyleAspectRatio) -> Self
Converts to this type from the input type.
Source§impl Hash for StyleAspectRatio
impl Hash for StyleAspectRatio
Source§impl Ord for StyleAspectRatio
impl Ord for StyleAspectRatio
Source§fn cmp(&self, other: &StyleAspectRatio) -> Ordering
fn cmp(&self, other: &StyleAspectRatio) -> Ordering
1.21.0 (const: unstable) · 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 StyleAspectRatio
impl PartialEq for StyleAspectRatio
Source§fn eq(&self, other: &StyleAspectRatio) -> bool
fn eq(&self, other: &StyleAspectRatio) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for StyleAspectRatio
impl PartialOrd for StyleAspectRatio
Source§impl PrintAsCssValue for StyleAspectRatio
impl PrintAsCssValue for StyleAspectRatio
fn print_as_css_value(&self) -> String
impl Copy for StyleAspectRatio
impl Eq for StyleAspectRatio
impl StructuralPartialEq for StyleAspectRatio
Auto Trait Implementations§
impl Freeze for StyleAspectRatio
impl RefUnwindSafe for StyleAspectRatio
impl Send for StyleAspectRatio
impl Sync for StyleAspectRatio
impl Unpin for StyleAspectRatio
impl UnsafeUnpin for StyleAspectRatio
impl UnwindSafe for StyleAspectRatio
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