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.
Fields
§
transformation: TransformationEditor
An editor.
Fields
§
transformation: TransformationCached
Some cached text.
Fields
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,
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