ScrollingStaticText

Struct ScrollingStaticText 

Source
pub struct ScrollingStaticText { /* private fields */ }
Expand description

A Scrollable displaying a static ascii byte-string slice.

Implementations§

Source§

impl ScrollingStaticText

Source

pub fn set_message(&mut self, message: &'static [u8])

Specifies the ascii byte-string slice to be displayed.

This also resets the animation to the beginning.

Trait Implementations§

Source§

impl Clone for ScrollingStaticText

Source§

fn clone(&self) -> ScrollingStaticText

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for ScrollingStaticText

Source§

fn default() -> ScrollingStaticText

Returns the “default value” for a type. Read more
Source§

impl Render for ScrollingStaticText

Source§

fn brightness_at(&self, x: usize, y: usize) -> u8

Returns the brightness value for a single LED. Read more
Source§

impl Scrollable for ScrollingStaticText

Source§

type Subimage = BitImage

The type of the underlying 5×5 images.
Source§

fn length(&self) -> usize

The number of underlying images.
Source§

fn state(&self) -> &ScrollingState

A ScrollingState indicating the current point in the animation.
Source§

fn state_mut(&mut self) -> &mut ScrollingState

A ScrollingState indicating the current point in the animation, as a mutable reference.
Source§

fn subimage(&self, index: usize) -> &BitImage

A reference to the underlying image at the specified index.
Source§

fn current_brightness_at(&self, x: usize, y: usize) -> u8

Returns the brightness value for a single LED in the current state. Read more
Source§

impl Copy for ScrollingStaticText

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Animate for T
where T: Scrollable,

Source§

fn is_finished(&self) -> bool

Say whether the animation has completed.
Source§

fn reset(&mut self)

Reset the animation to the beginning.
Source§

fn tick(&mut self)

Advance to the next step of the animation. Read more
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> 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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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, 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.