pub struct TextStyleInput {
pub font_size: Option<f32>,
pub font_family: Option<String>,
pub font_weight: Option<String>,
}Expand description
Simplified text style for sync MeasureText calls (serde-compatible).
Fields§
§font_size: Option<f32>§font_family: Option<String>§font_weight: Option<String>Implementations§
Source§impl TextStyleInput
impl TextStyleInput
pub fn to_platform_style(&self) -> TextStyle
Trait Implementations§
Source§impl Clone for TextStyleInput
impl Clone for TextStyleInput
Source§fn clone(&self) -> TextStyleInput
fn clone(&self) -> TextStyleInput
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 TextStyleInput
impl Debug for TextStyleInput
Source§impl Default for TextStyleInput
impl Default for TextStyleInput
Source§fn default() -> TextStyleInput
fn default() -> TextStyleInput
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TextStyleInput
impl<'de> Deserialize<'de> for TextStyleInput
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
Auto Trait Implementations§
impl Freeze for TextStyleInput
impl RefUnwindSafe for TextStyleInput
impl Send for TextStyleInput
impl Sync for TextStyleInput
impl Unpin for TextStyleInput
impl UnsafeUnpin for TextStyleInput
impl UnwindSafe for TextStyleInput
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