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 Freeze for LengthOrPercentage
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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 more