pub enum Text {
Paragraph {
paragraph: Weak,
position: Point,
color: Color,
clip_bounds: Rectangle,
transformation: Transformation,
},
Editor {
editor: Weak,
position: Point,
color: Color,
clip_bounds: Rectangle,
transformation: Transformation,
},
Cached {
content: String,
bounds: Rectangle,
color: Color,
size: Pixels,
line_height: Pixels,
font: Font,
align_x: Alignment,
align_y: Vertical,
shaping: Shaping,
clip_bounds: Rectangle,
},
Raw {
raw: Raw,
transformation: Transformation,
},
}
Expand description
A text primitive.
Variants§
Paragraph
A paragraph.
Editor
An editor.
Cached
Some cached text.
Fields
§
bounds: Rectangle
The bounds of the text.
§
color: Color
The color of the text.
§
size: Pixels
The size of the text in logical pixels.
§
line_height: Pixels
The line height of the text.
§
font: Font
The font of the text.
§
align_x: Alignment
The horizontal alignment of the text.
§
align_y: Vertical
The vertical alignment of the text.
§
shaping: Shaping
The shaping strategy of the text.
§
clip_bounds: Rectangle
The clip bounds of the text.
Raw
Some raw text.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Text
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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