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
Implementations§
Trait Implementations§
Source§impl From<Pixels> for LineHeight
impl From<Pixels> for LineHeight
Source§impl PartialOrd for Pixels
impl PartialOrd for Pixels
impl Copy for Pixels
impl StructuralPartialEq for Pixels
Auto Trait Implementations§
impl Freeze for Pixels
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.