pub struct Typography {
pub font_family: Option<String>,
pub font_size_base: Option<f32>,
pub font_size_small: Option<f32>,
pub font_size_large: Option<f32>,
pub font_weight: FontWeight,
pub line_height: Option<f32>,
}Expand description
Typography configuration
Fields§
§font_family: Option<String>§font_size_base: Option<f32>§font_size_small: Option<f32>§font_size_large: Option<f32>§font_weight: FontWeight§line_height: Option<f32>Implementations§
Source§impl Typography
impl Typography
Sourcepub fn validate_with_inheritance(
&self,
theme_name: &str,
parent_name: Option<&str>,
) -> Result<(), String>
pub fn validate_with_inheritance( &self, theme_name: &str, parent_name: Option<&str>, ) -> Result<(), String>
Validate typography with detailed error messages
Sourcepub fn inherit_from(&self, parent: &Typography) -> Self
pub fn inherit_from(&self, parent: &Typography) -> Self
Merge with a parent typography, inheriting missing values
Trait Implementations§
Source§impl Clone for Typography
impl Clone for Typography
Source§fn clone(&self) -> Typography
fn clone(&self) -> Typography
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 Typography
impl Debug for Typography
Source§impl<'de> Deserialize<'de> for Typography
impl<'de> Deserialize<'de> for Typography
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Typography
impl PartialEq for Typography
Source§impl Serialize for Typography
impl Serialize for Typography
impl StructuralPartialEq for Typography
Auto Trait Implementations§
impl Freeze for Typography
impl RefUnwindSafe for Typography
impl Send for Typography
impl Sync for Typography
impl Unpin for Typography
impl UnwindSafe for Typography
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