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