pub enum Length {
Absolute(AbsoluteLength),
Relative(RelativeLength),
}Expand description
Variants§
Absolute(AbsoluteLength)
Relative(RelativeLength)
Implementations§
Source§impl Length
impl Length
Sourcepub const fn is_absolute(&self) -> bool
pub const fn is_absolute(&self) -> bool
Returns true if the enum is Length::Absolute otherwise false
Sourcepub const fn is_relative(&self) -> bool
pub const fn is_relative(&self) -> bool
Returns true if the enum is Length::Relative otherwise false
Trait Implementations§
Source§impl AbsoluteLengthStorage for Length
impl AbsoluteLengthStorage for Length
fn absolute_length(value: AbsoluteLength) -> Selfwhere
Self: Sized,
Source§impl CapHeightStorage for Length
impl CapHeightStorage for Length
Source§impl CentimeterStorage for Length
impl CentimeterStorage for Length
Source§impl CharSizeStorage for Length
impl CharSizeStorage for Length
Source§impl ContainerLengthStorage for Length
impl ContainerLengthStorage for Length
fn container_length(value: ContainerLength) -> Selfwhere
Self: Sized,
Source§impl ContainerQueryBlockStorage for Length
impl ContainerQueryBlockStorage for Length
Source§impl ContainerQueryHeightStorage for Length
impl ContainerQueryHeightStorage for Length
Source§impl ContainerQueryInlineStorage for Length
impl ContainerQueryInlineStorage for Length
Source§impl ContainerQueryMaxStorage for Length
impl ContainerQueryMaxStorage for Length
Source§impl ContainerQueryMinStorage for Length
impl ContainerQueryMinStorage for Length
Source§impl ContainerQueryWidthStorage for Length
impl ContainerQueryWidthStorage for Length
Source§impl DynamicViewportBlockStorage for Length
impl DynamicViewportBlockStorage for Length
Source§impl DynamicViewportMaxStorage for Length
impl DynamicViewportMaxStorage for Length
Source§impl DynamicViewportMinStorage for Length
impl DynamicViewportMinStorage for Length
Source§impl DynamicViewportWidthStorage for Length
impl DynamicViewportWidthStorage for Length
Source§impl FontLengthStorage for Length
impl FontLengthStorage for Length
fn font_length(value: FontLength) -> Selfwhere
Self: Sized,
Source§impl From<AbsoluteLength> for Length
impl From<AbsoluteLength> for Length
Source§fn from(value: AbsoluteLength) -> Self
fn from(value: AbsoluteLength) -> Self
Converts to this type from the input type.
Source§impl From<ContainerLength> for Length
impl From<ContainerLength> for Length
Source§fn from(value: ContainerLength) -> Self
fn from(value: ContainerLength) -> Self
Converts to this type from the input type.
Source§impl From<FontLength> for Length
impl From<FontLength> for Length
Source§fn from(value: FontLength) -> Self
fn from(value: FontLength) -> Self
Converts to this type from the input type.
Source§impl From<Length> for LengthPercentage
impl From<Length> for LengthPercentage
Source§impl From<RelativeLength> for Length
impl From<RelativeLength> for Length
Source§fn from(value: RelativeLength) -> Self
fn from(value: RelativeLength) -> Self
Converts to this type from the input type.
Source§impl From<ViewportLength> for Length
impl From<ViewportLength> for Length
Source§fn from(value: ViewportLength) -> Self
fn from(value: ViewportLength) -> Self
Converts to this type from the input type.
Source§impl InchStorage for Length
impl InchStorage for Length
Source§impl LargeViewportBlockStorage for Length
impl LargeViewportBlockStorage for Length
Source§impl LargeViewportHeightStorage for Length
impl LargeViewportHeightStorage for Length
Source§impl LargeViewportInlineStorage for Length
impl LargeViewportInlineStorage for Length
Source§impl LargeViewportMaxStorage for Length
impl LargeViewportMaxStorage for Length
Source§impl LargeViewportMinStorage for Length
impl LargeViewportMinStorage for Length
Source§impl LargeViewportWidthStorage for Length
impl LargeViewportWidthStorage for Length
Source§impl LineHeightStorage for Length
impl LineHeightStorage for Length
Source§impl MillimeterStorage for Length
impl MillimeterStorage for Length
Source§impl PicaStorage for Length
impl PicaStorage for Length
Source§impl PixelStorage for Length
impl PixelStorage for Length
Source§impl PointStorage for Length
impl PointStorage for Length
Source§impl QuarterOfMillimeterStorage for Length
impl QuarterOfMillimeterStorage for Length
Source§impl RelativeCapHeightStorage for Length
impl RelativeCapHeightStorage for Length
Source§impl RelativeCharSizeStorage for Length
impl RelativeCharSizeStorage for Length
Source§impl RelativeEmStorage for Length
impl RelativeEmStorage for Length
Source§impl RelativeExStorage for Length
impl RelativeExStorage for Length
Source§impl RelativeIcStorage for Length
impl RelativeIcStorage for Length
Source§impl RelativeLengthStorage for Length
impl RelativeLengthStorage for Length
fn relative_length(value: RelativeLength) -> Selfwhere
Self: Sized,
Source§impl RelativeLineHeightStorage for Length
impl RelativeLineHeightStorage for Length
Source§impl SmallViewportBlockStorage for Length
impl SmallViewportBlockStorage for Length
Source§impl SmallViewportHeightStorage for Length
impl SmallViewportHeightStorage for Length
Source§impl SmallViewportInlineStorage for Length
impl SmallViewportInlineStorage for Length
Source§impl SmallViewportMaxStorage for Length
impl SmallViewportMaxStorage for Length
Source§impl SmallViewportMinStorage for Length
impl SmallViewportMinStorage for Length
Source§impl SmallViewportWidthStorage for Length
impl SmallViewportWidthStorage for Length
Source§impl ViewportBlockStorage for Length
impl ViewportBlockStorage for Length
Source§impl ViewportHeightStorage for Length
impl ViewportHeightStorage for Length
Source§impl ViewportInlineStorage for Length
impl ViewportInlineStorage for Length
Source§impl ViewportLengthStorage for Length
impl ViewportLengthStorage for Length
fn viewport_length(value: ViewportLength) -> Selfwhere
Self: Sized,
Source§impl ViewportMaxStorage for Length
impl ViewportMaxStorage for Length
Source§impl ViewportMinStorage for Length
impl ViewportMinStorage for Length
Source§impl ViewportWidthStorage for Length
impl ViewportWidthStorage for Length
impl StructuralPartialEq for Length
Auto Trait Implementations§
impl Freeze for Length
impl RefUnwindSafe for Length
impl Send for Length
impl Sync for Length
impl Unpin for Length
impl UnwindSafe for Length
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