pub struct ParagraphRun {
pub range: Range<usize>,
pub align: ParagraphAlign,
pub indent: f64,
pub space_before: f64,
pub space_after: f64,
pub list: ListStyle,
pub list_level: u8,
}Expand description
One styled paragraph.
A second range vector alongside TextRun rather than more fields on one, because these
attributes apply to whole paragraphs: folding alignment into a character run would let a
program say “center these three words”, which no text system can honor and every one of them
would resolve differently.
range is a byte range into the same string the runs address and covers whole paragraphs. A
gap is a paragraph with the document’s own defaults.
Fields§
§range: Range<usize>§align: ParagraphAlign§indent: f64§space_before: f64§space_after: f64§list: ListStyle§list_level: u8Implementations§
Source§impl ParagraphRun
impl ParagraphRun
pub fn new(range: Range<usize>, style: ParagraphStyle) -> ParagraphRun
pub fn style(&self) -> ParagraphStyle
Trait Implementations§
Source§impl Clone for ParagraphRun
impl Clone for ParagraphRun
Source§fn clone(&self) -> ParagraphRun
fn clone(&self) -> ParagraphRun
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 moreSource§impl Debug for ParagraphRun
impl Debug for ParagraphRun
Source§impl Default for ParagraphRun
impl Default for ParagraphRun
Source§fn default() -> ParagraphRun
fn default() -> ParagraphRun
Returns the “default value” for a type. Read more
Source§impl PartialEq for ParagraphRun
impl PartialEq for ParagraphRun
impl StructuralPartialEq for ParagraphRun
Auto Trait Implementations§
impl Freeze for ParagraphRun
impl RefUnwindSafe for ParagraphRun
impl Send for ParagraphRun
impl Sync for ParagraphRun
impl Unpin for ParagraphRun
impl UnsafeUnpin for ParagraphRun
impl UnwindSafe for ParagraphRun
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more