pub struct TypographyScale { /* private fields */ }
Expand description
Provides the scale details for typography, giving weights, sizes, and margins for each level
Implementations§
Source§impl TypographyScale
impl TypographyScale
Sourcepub fn new<I: IntoIterator<Item = (TypographyLevel, LevelScale)>>(
levels: I,
) -> Self
pub fn new<I: IntoIterator<Item = (TypographyLevel, LevelScale)>>( levels: I, ) -> Self
Creates a new scale from
Sourcepub fn at(&self, level: &TypographyLevel) -> Option<Sx>
pub fn at(&self, level: &TypographyLevel) -> Option<Sx>
Shortcut for getting an Sx
instance for a given, and also merges it with the “*” sx level
Sourcepub fn scale(&self, level: &TypographyLevel) -> Option<&LevelScale>
pub fn scale(&self, level: &TypographyLevel) -> Option<&LevelScale>
Gets the scale at the given level
Sourcepub fn scale_mut(&mut self, level: &TypographyLevel) -> Option<&mut LevelScale>
pub fn scale_mut(&mut self, level: &TypographyLevel) -> Option<&mut LevelScale>
Gets a mutable reference to the scale at the given level
Sourcepub fn insert(&mut self, level: TypographyLevel, level_sx: LevelScale)
pub fn insert(&mut self, level: TypographyLevel, level_sx: LevelScale)
Insert a scale for the given level
Trait Implementations§
Source§impl Clone for TypographyScale
impl Clone for TypographyScale
Source§fn clone(&self) -> TypographyScale
fn clone(&self) -> TypographyScale
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 TypographyScale
impl Debug for TypographyScale
Source§impl Default for TypographyScale
impl Default for TypographyScale
Source§fn default() -> TypographyScale
fn default() -> TypographyScale
Returns the “default value” for a type. Read more
Source§impl<'a> IntoIterator for &'a TypographyScale
impl<'a> IntoIterator for &'a TypographyScale
Source§type Item = (&'a TypographyLevel, &'a LevelScale)
type Item = (&'a TypographyLevel, &'a LevelScale)
The type of the elements being iterated over.
Source§type IntoIter = <&'a HashMap<TypographyLevel, LevelScale> as IntoIterator>::IntoIter
type IntoIter = <&'a HashMap<TypographyLevel, LevelScale> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
Source§impl PartialEq for TypographyScale
impl PartialEq for TypographyScale
impl StructuralPartialEq for TypographyScale
Auto Trait Implementations§
impl Freeze for TypographyScale
impl RefUnwindSafe for TypographyScale
impl Send for TypographyScale
impl Sync for TypographyScale
impl Unpin for TypographyScale
impl UnwindSafe for TypographyScale
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> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.