pub struct Text<'a, Coord, T: Borrow<str>> { /* private fields */ }
Expand description
A single line text element. This can be owned or borrowed string, dependeneds on
String
or str
moved into.
Implementations§
Trait Implementations§
Source§impl<'a, Coord: 'a, DB: DrawingBackend, T: Borrow<str>> Drawable<DB> for Text<'a, Coord, T>
impl<'a, Coord: 'a, DB: DrawingBackend, T: Borrow<str>> Drawable<DB> for Text<'a, Coord, T>
Source§fn draw<I: Iterator<Item = BackendCoord>>(
&self,
points: I,
backend: &mut DB,
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
fn draw<I: Iterator<Item = BackendCoord>>( &self, points: I, backend: &mut DB, ) -> Result<(), DrawingErrorKind<DB::ErrorType>>
Actually draws the element. The key points is already translated into the
image cooridnate and can be used by DC directly
Auto Trait Implementations§
impl<'a, Coord, T> Freeze for Text<'a, Coord, T>
impl<'a, Coord, T> !RefUnwindSafe for Text<'a, Coord, T>
impl<'a, Coord, T> !Send for Text<'a, Coord, T>
impl<'a, Coord, T> !Sync for Text<'a, Coord, T>
impl<'a, Coord, T> Unpin for Text<'a, Coord, T>
impl<'a, Coord, T> !UnwindSafe for Text<'a, Coord, T>
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, DB, Coord> IntoDynElement<DB, Coord> for Twhere
T: Drawable<DB> + 'static,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
impl<T, DB, Coord> IntoDynElement<DB, Coord> for Twhere
T: Drawable<DB> + 'static,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
Source§fn into_dyn(self) -> DynElement<DB, Coord>
fn into_dyn(self) -> DynElement<DB, Coord>
Make the conversion
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