pub struct WrappedLineLayout {
pub unwrapped_layout: Arc<LineLayout>,
pub wrap_boundaries: SmallVec<[WrapBoundary; 1]>,
pub wrap_width: Option<Pixels>,
}Expand description
重导出文本系统相关类型 已换行以适应给定宽度的文本行
Fields§
§unwrapped_layout: Arc<LineLayout>换行前的行布局
wrap_boundaries: SmallVec<[WrapBoundary; 1]>行被换行时的换行边界
wrap_width: Option<Pixels>如果已换行,则为行的宽度
Implementations§
Source§impl WrappedLineLayout
impl WrappedLineLayout
Sourcepub fn wrap_boundaries(&self) -> &[WrapBoundary]
pub fn wrap_boundaries(&self) -> &[WrapBoundary]
此布局中的换行边界
Sourcepub fn index_for_position(
&self,
position: Point<Pixels>,
line_height: Pixels,
) -> Result<usize, usize>
pub fn index_for_position( &self, position: Point<Pixels>, line_height: Pixels, ) -> Result<usize, usize>
返回给定位置在此布局中对应的索引(根据给定的行高)。
Trait Implementations§
Source§impl Debug for WrappedLineLayout
impl Debug for WrappedLineLayout
Auto Trait Implementations§
impl Forget for WrappedLineLayout
impl Freeze for WrappedLineLayout
impl Move for WrappedLineLayout
impl RefUnwindSafe for WrappedLineLayout
impl Send for WrappedLineLayout
impl Sync for WrappedLineLayout
impl Unpin for WrappedLineLayout
impl UnsafeUnpin for WrappedLineLayout
impl UnwindSafe for WrappedLineLayout
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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 more