pub struct TypeRhythm { /* private fields */ }Implementations§
Source§impl TypeRhythm
impl TypeRhythm
pub fn new( base_font_size_px: f64, base_line_height_px: f64, ) -> Result<TypeRhythm, TypeRhythmError>
pub fn baseline_unit(&self) -> f64
pub fn snap_to_baseline(&self, value_px: f64) -> Result<f64, TypeRhythmError>
pub fn lines_for_height(&self, height_px: f64) -> Result<f64, TypeRhythmError>
Trait Implementations§
Source§impl Clone for TypeRhythm
impl Clone for TypeRhythm
Source§fn clone(&self) -> TypeRhythm
fn clone(&self) -> TypeRhythm
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TypeRhythm
impl Debug for TypeRhythm
Source§impl PartialEq for TypeRhythm
impl PartialEq for TypeRhythm
Source§fn eq(&self, other: &TypeRhythm) -> bool
fn eq(&self, other: &TypeRhythm) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TypeRhythm
impl StructuralPartialEq for TypeRhythm
Auto Trait Implementations§
impl Freeze for TypeRhythm
impl RefUnwindSafe for TypeRhythm
impl Send for TypeRhythm
impl Sync for TypeRhythm
impl Unpin for TypeRhythm
impl UnsafeUnpin for TypeRhythm
impl UnwindSafe for TypeRhythm
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