pub struct ResolutionParams {
pub containing_block: LogicalSize,
pub viewport_size: LogicalSize,
pub element_font_size: f32,
pub root_font_size: f32,
}Expand description
Parameters needed to resolve CSS values to pixels.
Fields§
§containing_block: LogicalSizeThe containing block size (for % resolution)
viewport_size: LogicalSizeThe viewport size (for vh/vw resolution)
element_font_size: f32The element’s computed font-size (for em resolution)
root_font_size: f32The root element’s font-size (for rem resolution)
Implementations§
Source§impl ResolutionParams
impl ResolutionParams
Sourcepub fn to_resolution_context(&self) -> ResolutionContext
pub fn to_resolution_context(&self) -> ResolutionContext
Create a ResolutionContext from these parameters.
Trait Implementations§
Source§impl Clone for ResolutionParams
impl Clone for ResolutionParams
Source§fn clone(&self) -> ResolutionParams
fn clone(&self) -> ResolutionParams
Returns a duplicate 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 ResolutionParams
impl Debug for ResolutionParams
impl Copy for ResolutionParams
Auto Trait Implementations§
impl Freeze for ResolutionParams
impl RefUnwindSafe for ResolutionParams
impl Send for ResolutionParams
impl Sync for ResolutionParams
impl Unpin for ResolutionParams
impl UnsafeUnpin for ResolutionParams
impl UnwindSafe for ResolutionParams
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> 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