pub struct Styled<T, S> {
pub primitive: T,
pub style: S,
}
Expand description
Styled.
Fields§
§primitive: T
Primitive.
style: S
Style.
Implementations§
Trait Implementations§
Source§impl<T, S> Dimensions for Styled<T, S>where
T: Dimensions,
impl<T, S> Dimensions for Styled<T, S>where
T: Dimensions,
Source§impl<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,
Source§fn 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.
Source§fn bottom_right(&self) -> Point
fn bottom_right(&self) -> Point
Get the bottom right corner of the bounding box for an object
Source§impl<'a, C> Drawable<C> for &Styled<Circle, PrimitiveStyle<C>>where
C: PixelColor + 'a,
impl<'a, C> Drawable<C> for &Styled<Circle, PrimitiveStyle<C>>where
C: PixelColor + 'a,
Source§impl<'a, C> Drawable<C> for &Styled<Line, PrimitiveStyle<C>>where
C: PixelColor + 'a,
impl<'a, C> Drawable<C> for &Styled<Line, PrimitiveStyle<C>>where
C: PixelColor + 'a,
Source§impl<C> Drawable<C> for &Styled<Rectangle, PrimitiveStyle<C>>where
C: PixelColor,
impl<C> Drawable<C> for &Styled<Rectangle, PrimitiveStyle<C>>where
C: PixelColor,
Source§impl<'a, C> Drawable<C> for &Styled<Triangle, PrimitiveStyle<C>>where
C: PixelColor + 'a,
impl<'a, C> Drawable<C> for &Styled<Triangle, PrimitiveStyle<C>>where
C: PixelColor + 'a,
Source§impl<'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,
Source§impl<'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,
Source§impl<C> IntoIterator for &Styled<Rectangle, PrimitiveStyle<C>>where
C: PixelColor,
impl<C> IntoIterator for &Styled<Rectangle, PrimitiveStyle<C>>where
C: PixelColor,
Source§impl<C> IntoIterator for &Styled<Triangle, PrimitiveStyle<C>>where
C: PixelColor,
impl<C> IntoIterator for &Styled<Triangle, PrimitiveStyle<C>>where
C: PixelColor,
Source§impl<T: Ord, S: Ord> Ord for Styled<T, S>
impl<T: Ord, S: Ord> Ord for Styled<T, S>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd, S: PartialOrd> PartialOrd for Styled<T, S>
impl<T: PartialOrd, S: PartialOrd> PartialOrd for Styled<T, S>
impl<T: Copy, S: Copy> Copy for Styled<T, S>
impl<T: Eq, S: Eq> Eq for Styled<T, S>
impl<T, S> StructuralPartialEq for Styled<T, S>
Auto Trait Implementations§
impl<T, S> Freeze for Styled<T, S>
impl<T, S> RefUnwindSafe for Styled<T, S>where
T: RefUnwindSafe,
S: RefUnwindSafe,
impl<T, S> Send for Styled<T, S>
impl<T, S> Sync for Styled<T, S>
impl<T, S> Unpin for Styled<T, S>
impl<T, S> UnwindSafe for Styled<T, S>where
T: UnwindSafe,
S: UnwindSafe,
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,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.