pub struct ParagraphStyle {
pub text_align: Option<TextAlign>,
pub text_direction: Option<TextDirection>,
pub max_lines: Option<i32>,
pub font_family: Option<String>,
pub font_size: Option<f64>,
pub height: Option<f64>,
pub text_height_behavior: Option<TextHeightBehavior>,
pub font_weight: Option<FontWeight>,
pub font_style: Option<FontStyle>,
pub ellipsis: Option<String>,
pub strut_style: Option<StrutStyle>,
}Expand description
An opaque object that determines the configuration used by ParagraphBuilder to
position lines within a Paragraph of text.
The font fields (font_family, font_size, height, font_weight, font_style) are
the style for text that no pushed TextStyle covers.
Fields§
§text_align: Option<TextAlign>§text_direction: Option<TextDirection>§max_lines: Option<i32>§font_family: Option<String>§font_size: Option<f64>§height: Option<f64>§text_height_behavior: Option<TextHeightBehavior>§font_weight: Option<FontWeight>§font_style: Option<FontStyle>§ellipsis: Option<String>§strut_style: Option<StrutStyle>The strut every line keeps room for, as StrutStyle describes it.
Implementations§
Source§impl ParagraphStyle
impl ParagraphStyle
Sourcepub fn new() -> ParagraphStyle
pub fn new() -> ParagraphStyle
Creates a new paragraph style with every field unset.
Trait Implementations§
Source§impl Clone for ParagraphStyle
impl Clone for ParagraphStyle
Source§impl Debug for ParagraphStyle
impl Debug for ParagraphStyle
Source§impl Default for ParagraphStyle
impl Default for ParagraphStyle
Source§impl PartialEq for ParagraphStyle
impl PartialEq for ParagraphStyle
impl StructuralPartialEq for ParagraphStyle
Auto Trait Implementations§
impl Forget for ParagraphStyle
impl Freeze for ParagraphStyle
impl Move for ParagraphStyle
impl RefUnwindSafe for ParagraphStyle
impl Send for ParagraphStylewhere
RawVecInner: Send,
impl Sync for ParagraphStylewhere
RawVecInner: Sync,
impl Unpin for ParagraphStyle
impl UnsafeUnpin for ParagraphStylewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for ParagraphStylewhere
RawVecInner: UnwindSafe,
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