pub struct Pixels(pub f32);
Expand description
An amount of logical pixels.
Normally used to represent an amount of space, or the size of something.
This type is normally asked as an argument in a generic way
(e.g. impl Into<Pixels>
) and, since Pixels
implements From
both for
f32
and u16
, you should be able to provide both integers and float
literals as needed.
Tuple Fields§
§0: f32
Trait Implementations§
source§impl From<Pixels> for LineHeight
impl From<Pixels> for LineHeight
source§impl PartialEq for Pixels
impl PartialEq for Pixels
source§impl PartialOrd for Pixels
impl PartialOrd for Pixels
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Pixels
impl StructuralPartialEq for Pixels
Auto Trait Implementations§
impl RefUnwindSafe for Pixels
impl Send for Pixels
impl Sync for Pixels
impl Unpin for Pixels
impl UnwindSafe for Pixels
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