#[repr(u8)]pub enum AbsoluteLength {
Px(CSSFloat),
In(CSSFloat),
Cm(CSSFloat),
Mm(CSSFloat),
Q(CSSFloat),
Pt(CSSFloat),
Pc(CSSFloat),
}
Expand description
Represents an absolute length with its unit
Variants§
Px(CSSFloat)
An absolute length in pixels (px)
In(CSSFloat)
An absolute length in inches (in)
Cm(CSSFloat)
An absolute length in centimeters (cm)
Mm(CSSFloat)
An absolute length in millimeters (mm)
Q(CSSFloat)
An absolute length in quarter-millimeters (q)
Pt(CSSFloat)
An absolute length in points (pt)
Pc(CSSFloat)
An absolute length in pica (pc)
Implementations§
Trait Implementations§
source§impl Clone for AbsoluteLength
impl Clone for AbsoluteLength
source§fn clone(&self) -> AbsoluteLength
fn clone(&self) -> AbsoluteLength
Returns a copy 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 AbsoluteLength
impl Debug for AbsoluteLength
source§impl MallocSizeOf for AbsoluteLength
impl MallocSizeOf for AbsoluteLength
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl PartialEq for AbsoluteLength
impl PartialEq for AbsoluteLength
source§impl PartialOrd for AbsoluteLength
impl PartialOrd for AbsoluteLength
source§impl ToComputedValue for AbsoluteLength
impl ToComputedValue for AbsoluteLength
source§type ComputedValue = CSSPixelLength
type ComputedValue = CSSPixelLength
The computed value type we’re going to be converted to.
source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context
.source§fn from_computed_value(computed: &Self::ComputedValue) -> Self
fn from_computed_value(computed: &Self::ComputedValue) -> Self
Convert a computed value to specified value form. Read more
source§impl ToCss for AbsoluteLength
impl ToCss for AbsoluteLength
source§impl ToShmem for AbsoluteLength
impl ToShmem for AbsoluteLength
impl Copy for AbsoluteLength
impl StructuralPartialEq for AbsoluteLength
Auto Trait Implementations§
impl Freeze for AbsoluteLength
impl RefUnwindSafe for AbsoluteLength
impl Send for AbsoluteLength
impl Sync for AbsoluteLength
impl Unpin for AbsoluteLength
impl UnwindSafe for AbsoluteLength
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert