pub enum LineHeight {
Relative(f32),
Absolute(Pixels),
}
Expand description
The height of a line of text in a paragraph.
Variants§
Relative(f32)
A factor of the size of the text.
Absolute(Pixels)
An absolute height in logical pixels.
Implementations§
Source§impl LineHeight
impl LineHeight
Sourcepub fn to_absolute(self, text_size: Pixels) -> Pixels
pub fn to_absolute(self, text_size: Pixels) -> Pixels
Returns the LineHeight
in absolute logical pixels.
Trait Implementations§
Source§impl Clone for LineHeight
impl Clone for LineHeight
Source§fn clone(&self) -> LineHeight
fn clone(&self) -> LineHeight
Returns a copy 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 LineHeight
impl Debug for LineHeight
Source§impl Default for LineHeight
impl Default for LineHeight
Source§impl From<Pixels> for LineHeight
impl From<Pixels> for LineHeight
Source§impl From<f32> for LineHeight
impl From<f32> for LineHeight
Source§impl Hash for LineHeight
impl Hash for LineHeight
Source§impl PartialEq for LineHeight
impl PartialEq for LineHeight
impl Copy for LineHeight
impl StructuralPartialEq for LineHeight
Auto Trait Implementations§
impl Freeze for LineHeight
impl RefUnwindSafe for LineHeight
impl Send for LineHeight
impl Sync for LineHeight
impl Unpin for LineHeight
impl UnwindSafe for LineHeight
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.