pub struct LengthPercentageAuto(/* private fields */);Expand description
Implementations§
Source§impl LengthPercentageAuto
impl LengthPercentageAuto
Sourcepub const fn length(val: f32) -> Self
pub const fn length(val: f32) -> Self
An absolute length in some abstract units. Users of Taffy may define what they correspond to in their application (pixels, logical pixels, mm, etc) as they see fit.
Sourcepub const fn percent(val: f32) -> Self
pub const fn percent(val: f32) -> Self
A percentage length relative to the size of the containing block.
NOTE: percentages are represented as a f32 value in the range [0.0, 1.0] NOT the range [0.0, 100.0]
Sourcepub const fn auto() -> Self
pub const fn auto() -> Self
The dimension should be automatically computed according to algorithm-specific rules regarding the default size of boxes.
Sourcepub unsafe fn from_raw(val: CompactLength) -> Self
pub unsafe fn from_raw(val: CompactLength) -> Self
Create a LengthPercentageAuto from a raw CompactLength.
§Safety
CompactLength must represent a valid variant for LengthPercentageAuto
Sourcepub fn into_raw(self) -> CompactLength
pub fn into_raw(self) -> CompactLength
Get the underlying CompactLength representation of the value
Trait Implementations§
Source§impl Clone for LengthPercentageAuto
impl Clone for LengthPercentageAuto
Source§fn clone(&self) -> LengthPercentageAuto
fn clone(&self) -> LengthPercentageAuto
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 LengthPercentageAuto
impl Debug for LengthPercentageAuto
Source§impl From<LengthPercentage> for LengthPercentageAuto
impl From<LengthPercentage> for LengthPercentageAuto
Source§fn from(input: LengthPercentage) -> Self
fn from(input: LengthPercentage) -> Self
Converts to this type from the input type.
Source§impl From<LengthPercentageAuto> for Dimension
impl From<LengthPercentageAuto> for Dimension
Source§fn from(input: LengthPercentageAuto) -> Self
fn from(input: LengthPercentageAuto) -> Self
Converts to this type from the input type.
Source§impl From<LengthPercentageAuto> for MaxTrackSizingFunction
impl From<LengthPercentageAuto> for MaxTrackSizingFunction
Source§fn from(input: LengthPercentageAuto) -> Self
fn from(input: LengthPercentageAuto) -> Self
Converts to this type from the input type.
Source§impl From<LengthPercentageAuto> for TrackSizingFunction
impl From<LengthPercentageAuto> for TrackSizingFunction
Source§fn from(input: LengthPercentageAuto) -> Self
fn from(input: LengthPercentageAuto) -> Self
Converts to this type from the input type.
Source§impl From<LengthPercentageAuto> for MinTrackSizingFunction
impl From<LengthPercentageAuto> for MinTrackSizingFunction
Source§fn from(input: LengthPercentageAuto) -> Self
fn from(input: LengthPercentageAuto) -> Self
Converts to this type from the input type.
Source§impl FromLength for LengthPercentageAuto
impl FromLength for LengthPercentageAuto
Source§impl FromPercent for LengthPercentageAuto
impl FromPercent for LengthPercentageAuto
Source§impl MaybeResolve<Option<f32>, Option<f32>> for LengthPercentageAuto
impl MaybeResolve<Option<f32>, Option<f32>> for LengthPercentageAuto
Source§impl PartialEq for LengthPercentageAuto
impl PartialEq for LengthPercentageAuto
Source§impl ResolveOrZero<Option<f32>, f32> for LengthPercentageAuto
impl ResolveOrZero<Option<f32>, f32> for LengthPercentageAuto
Source§impl TaffyAuto for LengthPercentageAuto
impl TaffyAuto for LengthPercentageAuto
Source§impl TaffyZero for LengthPercentageAuto
impl TaffyZero for LengthPercentageAuto
impl Copy for LengthPercentageAuto
impl StructuralPartialEq for LengthPercentageAuto
Auto Trait Implementations§
impl Freeze for LengthPercentageAuto
impl RefUnwindSafe for LengthPercentageAuto
impl !Send for LengthPercentageAuto
impl !Sync for LengthPercentageAuto
impl Unpin for LengthPercentageAuto
impl UnwindSafe for LengthPercentageAuto
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