pub struct Rems(pub f32);Expand description
Represents a length in rems, a unit based on the font-size of the window, which can be assigned with Window::set_rem_size.
Rems are used for defining lengths that are scalable and consistent across different UI elements.
The value of 1rem is typically equal to the font-size of the root element (often the <html> element in browsers),
making it a flexible unit that adapts to the user’s text size preferences. In this framework, rems serve a similar
purpose, allowing for scalable and accessible design that can adjust to different display settings or user preferences.
For example, if the root element’s font-size is 16px, then 1rem equals 16px. A length of 2rems would then be 32px.
Tuple Fields§
§0: f32Implementations§
Trait Implementations§
Source§impl From<Rems> for AbsoluteLength
impl From<Rems> for AbsoluteLength
Source§impl From<Rems> for DefiniteLength
impl From<Rems> for DefiniteLength
impl Copy for Rems
impl StructuralPartialEq for Rems
Auto Trait Implementations§
impl Freeze for Rems
impl RefUnwindSafe for Rems
impl Send for Rems
impl Sync for Rems
impl Unpin for Rems
impl UnsafeUnpin for Rems
impl UnwindSafe for Rems
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().