Struct sensehat_screen::scroll::Scroll [−][src]
pub struct Scroll(_);
A type representing a collection of PixelFrames that may be scrolled.
Methods
impl Scroll[src]
impl Scrollpub fn new(frames: &[PixelFrame]) -> Self[src]
pub fn new(frames: &[PixelFrame]) -> SelfCreates 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]
pub fn frames(&self) -> &[PixelFrame]Returns &[PixelFrame] with the pixel frames that constitute this scroll.
pub fn clips(&self) -> Vec<Clip>[src]
pub fn clips(&self) -> Vec<Clip>Returns Vec<Clip> with the pixel frames clips that may be rendered.
pub fn reverse(&mut self)[src]
pub fn reverse(&mut self)Reverse the order of the inner pixel frames.
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeReturn the number of pixel frames in the scroll.
ⓘImportant traits for FrameSequencepub fn right_to_left(&self) -> FrameSequence[src]
pub fn right_to_left(&self) -> FrameSequenceReturns a FrameSequence iterator that moves the frames from the right to the left.
ⓘImportant traits for FrameSequencepub fn left_to_right(&self) -> FrameSequence[src]
pub fn left_to_right(&self) -> FrameSequenceReturns a FrameSequence iterator that moves the frames from the left to the right.
ⓘImportant traits for FrameSequencepub fn top_to_bottom(&self) -> FrameSequence[src]
pub fn top_to_bottom(&self) -> FrameSequenceReturns a FrameSequence iterator that moves the frames from the top to the bottom.
ⓘImportant traits for FrameSequencepub fn bottom_to_top(&self) -> FrameSequence[src]
pub fn bottom_to_top(&self) -> FrameSequenceReturns a FrameSequence iterator that moves the frames from the bottom to the bottom.
Trait Implementations
impl Debug for Scroll[src]
impl Debug for Scrollfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Scroll[src]
impl PartialEq for Scrollfn eq(&self, other: &Scroll) -> bool[src]
fn eq(&self, other: &Scroll) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Scroll) -> bool[src]
fn ne(&self, other: &Scroll) -> boolThis method tests for !=.
impl Index<usize> for Scroll[src]
impl Index<usize> for Scrolltype Output = PixelFrame
The returned type after indexing.
fn index(&self, index: usize) -> &PixelFrame[src]
fn index(&self, index: usize) -> &PixelFramePerforms the indexing (container[index]) operation.