pub struct ParagraphConstraints {
pub width: f64,
}Expand description
Layout constraints for Paragraph objects.
Instances of this class are typically used with Paragraph::layout.
Fields§
§width: f64The width the paragraph should use whey computing the positions of glyphs.
If possible, the paragraph will select a soft line break prior to reaching this width. If no soft line break is available, the paragraph will select a hard line break prior to reaching this width. If that would force a line break without any glyphs, the paragraph will place the first glyph on the line anyway.
Implementations§
Source§impl ParagraphConstraints
impl ParagraphConstraints
Sourcepub const fn new(width: f64) -> ParagraphConstraints
pub const fn new(width: f64) -> ParagraphConstraints
Creates constraints for laying out a paragraph.
Trait Implementations§
Source§impl Clone for ParagraphConstraints
impl Clone for ParagraphConstraints
Source§fn clone(&self) -> ParagraphConstraints
fn clone(&self) -> ParagraphConstraints
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ParagraphConstraints
Source§impl Debug for ParagraphConstraints
impl Debug for ParagraphConstraints
Source§impl PartialEq for ParagraphConstraints
impl PartialEq for ParagraphConstraints
impl StructuralPartialEq for ParagraphConstraints
Auto Trait Implementations§
impl Freeze for ParagraphConstraints
impl RefUnwindSafe for ParagraphConstraints
impl Send for ParagraphConstraints
impl Sync for ParagraphConstraints
impl Unpin for ParagraphConstraints
impl UnsafeUnpin for ParagraphConstraints
impl UnwindSafe for ParagraphConstraints
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