Skip to main content

Led2dGenerated

Struct Led2dGenerated 

Source
pub struct Led2dGenerated;
Expand description

Sample struct type generated by the led2d! macro.

This page exists to show constructor, constants, and trait methods in one place. For narrative examples, see the led2d module.

Auto-generated.

Implementations§

Source§

impl Led2dGenerated

Source

pub const MAX_FRAMES: usize = 16

Maximum number of animation frames.

Source

pub const MAX_BRIGHTNESS: u8 = 22

Maximum brightness level after current limiting.

Source

pub const FONT: Led2dFont = Led2dFont::Font3x4Trim

Default font used by text helpers.

Source

pub const WIDTH: usize = 12

Panel width in pixels.

Source

pub const HEIGHT: usize = 4

Panel height in pixels.

Source

pub const LEN: usize = 48

Total LED count (WIDTH * HEIGHT).

Source

pub const SIZE: Size = Frame2d<12, 4>::SIZE

Panel dimensions.

Source

pub const TOP_LEFT: Point = Frame2d<12, 4>::TOP_LEFT

Top-left corner coordinate.

Source

pub const TOP_RIGHT: Point = Frame2d<12, 4>::TOP_RIGHT

Top-right corner coordinate.

Source

pub const BOTTOM_LEFT: Point = Frame2d<12, 4>::BOTTOM_LEFT

Bottom-left corner coordinate.

Source

pub const BOTTOM_RIGHT: Point = Frame2d<12, 4>::BOTTOM_RIGHT

Bottom-right corner coordinate.

Source

pub fn new( pin: impl Sized, channel_creator: impl Sized, spawner: Spawner, ) -> Result<&'static Self>

Create a new LED panel instance of the struct type defined by led2d!.

See the led2d module docs for usage examples.

Trait Implementations§

Source§

impl Led2d<12, 4> for &'static Led2dGenerated

Source§

const WIDTH: usize = Led2dGenerated::WIDTH

The width of the panel.
Source§

const HEIGHT: usize = Led2dGenerated::HEIGHT

The height of the panel.
Source§

const LEN: usize = Led2dGenerated::LEN

Total LEDs in this panel (width × height).
Source§

const SIZE: Size = Led2dGenerated::SIZE

Panel dimensions as a Size. Read more
Source§

const TOP_LEFT: Point = Led2dGenerated::TOP_LEFT

Top-left corner coordinate as a Point. Read more
Source§

const TOP_RIGHT: Point = Led2dGenerated::TOP_RIGHT

Top-right corner coordinate as a Point. Read more
Source§

const BOTTOM_LEFT: Point = Led2dGenerated::BOTTOM_LEFT

Bottom-left corner coordinate as a Point. Read more
Source§

const BOTTOM_RIGHT: Point = Led2dGenerated::BOTTOM_RIGHT

Bottom-right corner coordinate as a Point. Read more
Source§

const MAX_FRAMES: usize = Led2dGenerated::MAX_FRAMES

Maximum number of animation frames allowed. Read more
Source§

const MAX_BRIGHTNESS: u8 = Led2dGenerated::MAX_BRIGHTNESS

Maximum brightness level, automatically limited by the power budget. Read more
Source§

const FONT: Led2dFont = Led2dGenerated::FONT

The font used by default text helpers. Read more
Source§

fn write_frame(&self, frame2d: Frame2d<12, 4>)

Write a frame to the LED panel. Read more
Source§

fn animate<I>(&self, frames: I)
where I: IntoIterator, I::Item: Borrow<(Frame2d<12, 4>, Duration)>,

Animate frames on the LED panel. Read more
Source§

fn write_text_to_frame( &self, text: &str, colors: &[Rgb<u8>], frame: &mut Frame2d<W, H>, )

Write text into a frame. Read more
Source§

fn write_text(&self, text: &str, colors: &[Rgb<u8>])

Write text to the LED panel. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.