Struct embedded_graphics::style::Styled
source · [−]pub struct Styled<T, S> {
pub primitive: T,
pub style: S,
}
Expand description
Styled.
Fields
primitive: T
Primitive.
style: S
Style.
Implementations
Trait Implementations
sourceimpl<C, F> Dimensions for Styled<Text<'_>, TextStyle<C, F>> where
C: PixelColor,
F: Font,
impl<C, F> Dimensions for Styled<Text<'_>, TextStyle<C, F>> where
C: PixelColor,
F: Font,
sourcefn size(&self) -> Size
fn size(&self) -> Size
Returns the size of the bounding box of a styled text.
Currently does not handle newlines (but neither does the rasteriser).
It will return Size::zero()
if the string to render is empty.
sourcefn bottom_right(&self) -> Point
fn bottom_right(&self) -> Point
Get the bottom right corner of the bounding box for an object
sourceimpl<T, S> Dimensions for Styled<T, S> where
T: Dimensions,
impl<T, S> Dimensions for Styled<T, S> where
T: Dimensions,
sourceimpl<C, F> Drawable<C> for &Styled<Text<'_>, TextStyle<C, F>> where
C: PixelColor,
F: Font + Copy,
impl<C, F> Drawable<C> for &Styled<Text<'_>, TextStyle<C, F>> where
C: PixelColor,
F: Font + Copy,
sourceimpl<'a, C: 'a> Drawable<C> for &Styled<Circle, PrimitiveStyle<C>> where
C: PixelColor,
impl<'a, C: 'a> Drawable<C> for &Styled<Circle, PrimitiveStyle<C>> where
C: PixelColor,
sourceimpl<'a, C: 'a> Drawable<C> for &Styled<Line, PrimitiveStyle<C>> where
C: PixelColor,
impl<'a, C: 'a> Drawable<C> for &Styled<Line, PrimitiveStyle<C>> where
C: PixelColor,
sourceimpl<C> Drawable<C> for &Styled<Rectangle, PrimitiveStyle<C>> where
C: PixelColor,
impl<C> Drawable<C> for &Styled<Rectangle, PrimitiveStyle<C>> where
C: PixelColor,
sourceimpl<'a, C: 'a> Drawable<C> for &Styled<Triangle, PrimitiveStyle<C>> where
C: PixelColor,
impl<'a, C: 'a> Drawable<C> for &Styled<Triangle, PrimitiveStyle<C>> where
C: PixelColor,
sourceimpl<'a, C, F> IntoIterator for &Styled<Text<'a>, TextStyle<C, F>> where
C: PixelColor,
F: Font + Copy,
impl<'a, C, F> IntoIterator for &Styled<Text<'a>, TextStyle<C, F>> where
C: PixelColor,
F: Font + Copy,
sourceimpl<'a, C> IntoIterator for &'a Styled<Circle, PrimitiveStyle<C>> where
C: PixelColor,
impl<'a, C> IntoIterator for &'a Styled<Circle, PrimitiveStyle<C>> where
C: PixelColor,
sourceimpl<'a, C> IntoIterator for &'a Styled<Line, PrimitiveStyle<C>> where
C: PixelColor,
impl<'a, C> IntoIterator for &'a Styled<Line, PrimitiveStyle<C>> where
C: PixelColor,
sourceimpl<C> IntoIterator for &Styled<Rectangle, PrimitiveStyle<C>> where
C: PixelColor,
impl<C> IntoIterator for &Styled<Rectangle, PrimitiveStyle<C>> where
C: PixelColor,
sourceimpl<C> IntoIterator for &Styled<Triangle, PrimitiveStyle<C>> where
C: PixelColor,
impl<C> IntoIterator for &Styled<Triangle, PrimitiveStyle<C>> where
C: PixelColor,
sourceimpl<T: Ord, S: Ord> Ord for Styled<T, S>
impl<T: Ord, S: Ord> Ord for Styled<T, S>
sourceimpl<T: PartialOrd, S: PartialOrd> PartialOrd<Styled<T, S>> for Styled<T, S>
impl<T: PartialOrd, S: PartialOrd> PartialOrd<Styled<T, S>> for Styled<T, S>
sourcefn partial_cmp(&self, other: &Styled<T, S>) -> Option<Ordering>
fn partial_cmp(&self, other: &Styled<T, S>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<T: Copy, S: Copy> Copy for Styled<T, S>
impl<T: Eq, S: Eq> Eq for Styled<T, S>
impl<T, S> StructuralEq for Styled<T, S>
impl<T, S> StructuralPartialEq for Styled<T, S>
Auto Trait Implementations
impl<T, S> RefUnwindSafe for Styled<T, S> where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for Styled<T, S> where
S: Send,
T: Send,
impl<T, S> Sync for Styled<T, S> where
S: Sync,
T: Sync,
impl<T, S> Unpin for Styled<T, S> where
S: Unpin,
T: Unpin,
impl<T, S> UnwindSafe for Styled<T, S> where
S: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more