#[non_exhaustive]pub struct TextOverflowInfo {
pub line: usize,
pub text_char: usize,
pub included_glyphs: SmallVec<[Range<usize>; 1]>,
pub suffix_origin: Point2D<f32, Px>,
}Expand description
Info about a shaped text overflow in constraint.
Can be computed using ShapedText::overflow_info.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.line: usizeFirst overflow line.
All segments in this line and next lines are fully overflown. The previous line may be partially overflown, the lines before that are fully visible.
Is the ShapedText::lines_len if the last line is fully visible.
text_char: usizeFirst overflow character in the text.
Note that if overflow is not wrapping (single text line) the char may not cover all visible glyphs in the line if it is bidirectional.
included_glyphs: SmallVec<[Range<usize>; 1]>Glyphs not overflown in the last not overflown line.
If the line is not bidirectional this will be a single range covering the not overflow glyphs, if it is bidi multiple ranges are possible due to bidi reordering.
suffix_origin: Point2D<f32, Px>Placement of the suffix (ellipses or custom).
The suffix must be of the width given to ShapedText::overflow_info and the same line height
as the text.
Trait Implementations§
Source§impl Clone for TextOverflowInfo
impl Clone for TextOverflowInfo
Source§fn clone(&self) -> TextOverflowInfo
fn clone(&self) -> TextOverflowInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TextOverflowInfo
impl Debug for TextOverflowInfo
Source§impl<'de> Deserialize<'de> for TextOverflowInfo
impl<'de> Deserialize<'de> for TextOverflowInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TextOverflowInfo
impl PartialEq for TextOverflowInfo
Source§impl Serialize for TextOverflowInfo
impl Serialize for TextOverflowInfo
impl StructuralPartialEq for TextOverflowInfo
Auto Trait Implementations§
impl Freeze for TextOverflowInfo
impl RefUnwindSafe for TextOverflowInfo
impl Send for TextOverflowInfo
impl Sync for TextOverflowInfo
impl Unpin for TextOverflowInfo
impl UnwindSafe for TextOverflowInfo
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other if both are of the same type.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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