Struct sensehat_screen::scroll::Scroll [−][src]
pub struct Scroll(_);
A type representing a collection of PixelFrame
s that may be scrolled.
Methods
impl Scroll
[src]
impl Scroll
pub fn new(frames: &[PixelFrame]) -> Self
[src]
pub fn new(frames: &[PixelFrame]) -> Self
Creates a new scroll from a slice of PixelFrame
s.
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) -> usize
Return 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) -> FrameSequence
Returns 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) -> FrameSequence
Returns 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) -> FrameSequence
Returns 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) -> FrameSequence
Returns a FrameSequence
iterator that moves the frames from the bottom to the bottom.
Trait Implementations
impl Debug for Scroll
[src]
impl Debug for Scroll
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Scroll
[src]
impl PartialEq for Scroll
fn eq(&self, other: &Scroll) -> bool
[src]
fn eq(&self, other: &Scroll) -> bool
This 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) -> bool
This method tests for !=
.
impl Index<usize> for Scroll
[src]
impl Index<usize> for Scroll
type Output = PixelFrame
The returned type after indexing.
fn index(&self, index: usize) -> &PixelFrame
[src]
fn index(&self, index: usize) -> &PixelFrame
Performs the indexing (container[index]
) operation.