Struct layout_2013::text::RunInfo
source · struct RunInfo {
text: String,
insertion_point: Option<ByteIndex>,
font: Option<FontRef>,
bidi_level: Level,
script: Script,
}
Expand description
Information about a text run that we’re about to create. This is used in scan_for_runs
.
Fields§
§text: String
The text that will go in this text run.
insertion_point: Option<ByteIndex>
The insertion point in this text run, if applicable.
font: Option<FontRef>
The font that the text should be rendered with.
bidi_level: Level
The bidirection embedding level of this text run.
script: Script
The Unicode script property of this text run.
Implementations§
source§impl RunInfo
impl RunInfo
fn new() -> RunInfo
sourcefn flush(self, list: &mut Vec<RunInfo>, insertion_point: &mut Option<ByteIndex>)
fn flush(self, list: &mut Vec<RunInfo>, insertion_point: &mut Option<ByteIndex>)
Finish processing this RunInfo and add it to the “done” list.
insertion_point
: The position of the insertion point, in characters relative to the start of this text run.
fn has_font(&self, font: &Option<FontRef>) -> bool
Auto Trait Implementations§
impl Freeze for RunInfo
impl !RefUnwindSafe for RunInfo
impl Send for RunInfo
impl Sync for RunInfo
impl Unpin for RunInfo
impl !UnwindSafe for RunInfo
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert