Skip to main content

ParagraphLayout

Struct ParagraphLayout 

Source
pub struct ParagraphLayout<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> ParagraphLayout<'a>

Source

pub fn from_slices( lines: &'a [LayoutLine], runs: &'a [VisualRun], glyphs: &'a [PositionedGlyph], carets: &'a [CaretStop], ) -> Result<Self, LayoutError>

Borrows cached paragraph products after validating their ranges.

Source

pub const fn lines(&self) -> &[LayoutLine]

Source

pub const fn runs(&self) -> &[VisualRun]

Source

pub const fn glyphs(&self) -> &[PositionedGlyph]

Source

pub const fn carets(&self) -> &[CaretStop]

Source§

impl<'layout> ParagraphLayout<'layout>

Source

pub fn place_on<'a, B>( &'a self, baselines: &'a [B], ) -> BaselinePlacement<'a, 'layout, [B]>
where B: TextBaseline,

Source

pub fn place_with<'a, P>( &'a self, baselines: &'a P, ) -> BaselinePlacement<'a, 'layout, P>
where P: BaselineProvider + ?Sized,

Auto Trait Implementations§

§

impl<'a> Forget for ParagraphLayout<'a>

§

impl<'a> Freeze for ParagraphLayout<'a>

§

impl<'a> RefUnwindSafe for ParagraphLayout<'a>

§

impl<'a> Send for ParagraphLayout<'a>

§

impl<'a> Sync for ParagraphLayout<'a>

§

impl<'a> Unpin for ParagraphLayout<'a>

§

impl<'a> UnsafeUnpin for ParagraphLayout<'a>

§

impl<'a> UnwindSafe for ParagraphLayout<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.