pub enum LengthOrPercentageOrAuto {
Length(Length),
Percentage(Percentage),
Auto,
}
Variants§
Implementations§
source§impl LengthOrPercentageOrAuto
impl LengthOrPercentageOrAuto
pub fn inner_px(&self) -> f32
pub fn non_auto(&self) -> Option<LengthOrPercentage>
pub fn percentage_relative_to(&self, reference: Length) -> LengthOrAuto
Trait Implementations§
source§impl Clone for LengthOrPercentageOrAuto
impl Clone for LengthOrPercentageOrAuto
source§fn clone(&self) -> LengthOrPercentageOrAuto
fn clone(&self) -> LengthOrPercentageOrAuto
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 LengthOrPercentageOrAuto
impl Debug for LengthOrPercentageOrAuto
source§impl From<Length> for LengthOrPercentageOrAuto
impl From<Length> for LengthOrPercentageOrAuto
source§impl From<LengthOrPercentage> for LengthOrPercentageOrAuto
impl From<LengthOrPercentage> for LengthOrPercentageOrAuto
source§fn from(value: LengthOrPercentage) -> Self
fn from(value: LengthOrPercentage) -> Self
Converts to this type from the input type.
source§impl From<Percentage> for LengthOrPercentageOrAuto
impl From<Percentage> for LengthOrPercentageOrAuto
source§fn from(x: Percentage) -> Self
fn from(x: Percentage) -> Self
Converts to this type from the input type.
source§impl FromSpecified for LengthOrPercentageOrAuto
impl FromSpecified for LengthOrPercentageOrAuto
fn from_specified( specified: &Self::SpecifiedValue, context: &CascadeContext<'_> ) -> Self
impl Copy for LengthOrPercentageOrAuto
Auto Trait Implementations§
impl RefUnwindSafe for LengthOrPercentageOrAuto
impl Send for LengthOrPercentageOrAuto
impl Sync for LengthOrPercentageOrAuto
impl Unpin for LengthOrPercentageOrAuto
impl UnwindSafe for LengthOrPercentageOrAuto
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