pub struct Dp(pub f32);Expand description
Density-independent pixels: a layout length that reads the same on every device regardless of its pixel density.
Tuple Fields§
§0: f32Implementations§
Trait Implementations§
impl Copy for Dp
Source§impl PartialOrd for Dp
impl PartialOrd for Dp
Source§impl SpringScalar for Dp
impl SpringScalar for Dp
Source§const DIMENSIONS: usize = 1
const DIMENSIONS: usize = 1
Number of animated dimensions (1..=4).
Source§fn from_dimensions(dimensions: [f32; 4]) -> Dp
fn from_dimensions(dimensions: [f32; 4]) -> Dp
Rebuilds a value from per-dimension floats (indices beyond
Self::DIMENSIONS are ignored).impl StructuralPartialEq for Dp
Auto Trait Implementations§
impl Freeze for Dp
impl RefUnwindSafe for Dp
impl Send for Dp
impl Sync for Dp
impl Unpin for Dp
impl UnsafeUnpin for Dp
impl UnwindSafe for Dp
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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