#[repr(C)]pub struct LayoutWidth {
pub inner: PixelValue,
}Expand description
Represents a width attribute
Fields§
§inner: PixelValueImplementations§
Source§impl LayoutWidth
impl LayoutWidth
pub const fn zero() -> Self
Sourcepub const fn const_px(value: isize) -> Self
pub const fn const_px(value: isize) -> Self
Same as PixelValue::px(), but only accepts whole numbers,
since using f32 in const fn is not yet stabilized.
Sourcepub const fn const_em(value: isize) -> Self
pub const fn const_em(value: isize) -> Self
Same as PixelValue::em(), but only accepts whole numbers,
since using f32 in const fn is not yet stabilized.
Sourcepub const fn const_pt(value: isize) -> Self
pub const fn const_pt(value: isize) -> Self
Same as PixelValue::pt(), but only accepts whole numbers,
since using f32 in const fn is not yet stabilized.
Sourcepub const fn const_percent(value: isize) -> Self
pub const fn const_percent(value: isize) -> Self
Same as PixelValue::pt(), but only accepts whole numbers,
since using f32 in const fn is not yet stabilized.
pub const fn const_from_metric(metric: SizeMetric, value: isize) -> Self
pub fn px(value: f32) -> Self
pub fn em(value: f32) -> Self
pub fn pt(value: f32) -> Self
pub fn percent(value: f32) -> Self
pub fn from_metric(metric: SizeMetric, value: f32) -> Self
pub fn interpolate(&self, other: &Self, t: f32) -> Self
Trait Implementations§
Source§impl Clone for LayoutWidth
impl Clone for LayoutWidth
Source§fn clone(&self) -> LayoutWidth
fn clone(&self) -> LayoutWidth
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 LayoutWidth
impl Debug for LayoutWidth
Source§impl Default for LayoutWidth
impl Default for LayoutWidth
Source§fn default() -> LayoutWidth
fn default() -> LayoutWidth
Returns the “default value” for a type. Read more
Source§impl Display for LayoutWidth
impl Display for LayoutWidth
Source§impl From<LayoutWidth> for CssProperty
impl From<LayoutWidth> for CssProperty
Source§fn from(e: LayoutWidth) -> Self
fn from(e: LayoutWidth) -> Self
Converts to this type from the input type.
Source§impl Hash for LayoutWidth
impl Hash for LayoutWidth
Source§impl Ord for LayoutWidth
impl Ord for LayoutWidth
Source§fn cmp(&self, other: &LayoutWidth) -> Ordering
fn cmp(&self, other: &LayoutWidth) -> 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 LayoutWidth
impl PartialEq for LayoutWidth
Source§impl PartialOrd for LayoutWidth
impl PartialOrd for LayoutWidth
Source§impl PrintAsCssValue for LayoutWidth
impl PrintAsCssValue for LayoutWidth
fn print_as_css_value(&self) -> String
impl Copy for LayoutWidth
impl Eq for LayoutWidth
impl StructuralPartialEq for LayoutWidth
Auto Trait Implementations§
impl Freeze for LayoutWidth
impl RefUnwindSafe for LayoutWidth
impl Send for LayoutWidth
impl Sync for LayoutWidth
impl Unpin for LayoutWidth
impl UnwindSafe for LayoutWidth
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