[−][src]Struct embedded_text::prelude::TextStyle
Style properties for text.
A TextStyle can be applied to a Text object to define how the text is drawn.
Because TextStyle has the non_exhaustive attribute, it cannot be created using a struct
literal. To create a TextStyle, use the text_style! macro or TextStyleBuilder.
Fields (Non-exhaustive)
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text_color: Option<C>Text color.
background_color: Option<C>Background color.
font: FFont.
Implementations
impl<C, F> TextStyle<C, F> where
C: PixelColor,
F: Font, [src]
C: PixelColor,
F: Font,
pub fn new(font: F, text_color: C) -> TextStyle<C, F>[src]
Creates a text style with transparent background.
Trait Implementations
impl<C, F> Clone for TextStyle<C, F> where
C: Clone + PixelColor,
F: Clone + Font, [src]
C: Clone + PixelColor,
F: Clone + Font,
impl<C, F> Copy for TextStyle<C, F> where
C: Copy + PixelColor,
F: Copy + Font, [src]
C: Copy + PixelColor,
F: Copy + Font,
impl<C, F> Debug for TextStyle<C, F> where
C: Debug + PixelColor,
F: Debug + Font, [src]
C: Debug + PixelColor,
F: Debug + Font,
impl<C, F> Default for TextStyle<C, F> where
C: Default + PixelColor,
F: Default + Font, [src]
C: Default + PixelColor,
F: Default + Font,
impl<C, F> Eq for TextStyle<C, F> where
C: Eq + PixelColor,
F: Eq + Font, [src]
C: Eq + PixelColor,
F: Eq + Font,
impl<C, F> Hash for TextStyle<C, F> where
C: Hash + PixelColor,
F: Hash + Font, [src]
C: Hash + PixelColor,
F: Hash + Font,
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher, [src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<C, F> Ord for TextStyle<C, F> where
C: Ord + PixelColor,
F: Ord + Font, [src]
C: Ord + PixelColor,
F: Ord + Font,
fn cmp(&self, other: &TextStyle<C, F>) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl<C, F> PartialEq<TextStyle<C, F>> for TextStyle<C, F> where
C: PartialEq<C> + PixelColor,
F: PartialEq<F> + Font, [src]
C: PartialEq<C> + PixelColor,
F: PartialEq<F> + Font,
fn eq(&self, other: &TextStyle<C, F>) -> bool[src]
fn ne(&self, other: &TextStyle<C, F>) -> bool[src]
impl<C, F> PartialOrd<TextStyle<C, F>> for TextStyle<C, F> where
C: PartialOrd<C> + PixelColor,
F: PartialOrd<F> + Font, [src]
C: PartialOrd<C> + PixelColor,
F: PartialOrd<F> + Font,
Auto Trait Implementations
impl<C, F> RefUnwindSafe for TextStyle<C, F> where
C: RefUnwindSafe,
F: RefUnwindSafe,
C: RefUnwindSafe,
F: RefUnwindSafe,
impl<C, F> Send for TextStyle<C, F> where
C: Send,
F: Send,
C: Send,
F: Send,
impl<C, F> Sync for TextStyle<C, F> where
C: Sync,
F: Sync,
C: Sync,
F: Sync,
impl<C, F> Unpin for TextStyle<C, F> where
C: Unpin,
F: Unpin,
C: Unpin,
F: Unpin,
impl<C, F> UnwindSafe for TextStyle<C, F> where
C: UnwindSafe,
F: UnwindSafe,
C: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,