Skip to main content

BidiParagraph

Struct BidiParagraph 

Source
pub struct BidiParagraph {
    pub runs: Vec<BidiRun>,
    pub para_level: u8,
}
Expand description

A paragraph’s bidi structure in logical order.

bidi_runs returns runs already reordered for display, which suits a single-line label that is shaped and painted in one go. The multi-line editor cannot use that: line breaking is a logical operation, so runs have to stay in logical order until the breaker has decided where the lines fall, and only then get reordered per line. Reordering the paragraph up front and breaking afterwards would scramble any paragraph that wraps.

Fields§

§runs: Vec<BidiRun>

Runs of uniform embedding level, in logical order.

§para_level: u8

The paragraph embedding level actually used — the explicit base direction when one was given, else the rule P2/P3 auto-detection.

Implementations§

Source§

impl BidiParagraph

Source

pub fn base_direction(&self) -> TextDirection

The paragraph’s base direction, as resolved.

Auto Trait Implementations§

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> ErasedDestructor for T
where T: 'static,

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.