[][src]Struct sensehat_screen::scroll::Scroll

pub struct Scroll(_);

A type representing a collection of PixelFrames that may be scrolled.

Implementations

impl Scroll[src]

pub fn new(frames: &[PixelFrame]) -> Self[src]

Creates a new scroll from a slice of PixelFrames.

Panics

The scroll needs at least 2 PixelFrames to be created.

pub fn frames(&self) -> &[PixelFrame][src]

Returns &[PixelFrame] with the pixel frames that constitute this scroll.

pub fn clips(&self) -> Vec<Clip>[src]

Returns Vec<Clip> with the pixel frames clips that may be rendered.

pub fn reverse(&mut self)[src]

Reverse the order of the inner pixel frames.

pub fn len(&self) -> usize[src]

Return the number of pixel frames in the scroll.

pub fn is_empty(&self) -> bool[src]

Returns true if the scroll has no pixel frames.

pub fn right_to_left(&self) -> FrameSequence

Notable traits for FrameSequence

impl Iterator for FrameSequence type Item = PixelFrame;
[src]

Returns a FrameSequence iterator that moves the frames from the right to the left.

pub fn left_to_right(&self) -> FrameSequence

Notable traits for FrameSequence

impl Iterator for FrameSequence type Item = PixelFrame;
[src]

Returns a FrameSequence iterator that moves the frames from the left to the right.

pub fn top_to_bottom(&self) -> FrameSequence

Notable traits for FrameSequence

impl Iterator for FrameSequence type Item = PixelFrame;
[src]

Returns a FrameSequence iterator that moves the frames from the top to the bottom.

pub fn bottom_to_top(&self) -> FrameSequence

Notable traits for FrameSequence

impl Iterator for FrameSequence type Item = PixelFrame;
[src]

Returns a FrameSequence iterator that moves the frames from the bottom to the bottom.

Trait Implementations

impl Debug for Scroll[src]

impl Index<usize> for Scroll[src]

type Output = PixelFrame

The returned type after indexing.

impl PartialEq<Scroll> for Scroll[src]

impl StructuralPartialEq for Scroll[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.