#[repr(C)]pub struct LayoutTop {
pub inner: PixelValue,
}Expand description
Represents a top attribute
Fields§
§inner: PixelValueImplementations§
Source§impl LayoutTop
impl LayoutTop
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 From<LayoutTop> for CssProperty
impl From<LayoutTop> for CssProperty
Source§impl Ord for LayoutTop
impl Ord for LayoutTop
Source§impl PartialOrd for LayoutTop
impl PartialOrd for LayoutTop
Source§impl PrintAsCssValue for LayoutTop
impl PrintAsCssValue for LayoutTop
fn print_as_css_value(&self) -> String
impl Copy for LayoutTop
impl Eq for LayoutTop
impl StructuralPartialEq for LayoutTop
Auto Trait Implementations§
impl Freeze for LayoutTop
impl RefUnwindSafe for LayoutTop
impl Send for LayoutTop
impl Sync for LayoutTop
impl Unpin for LayoutTop
impl UnwindSafe for LayoutTop
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