[−][src]Struct sensehat_screen::scroll::Scroll
A type representing a collection of PixelFrame
s that may be scrolled.
Methods
impl Scroll
[src]
pub fn new(frames: &[PixelFrame]) -> Self
[src]
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]
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.
ⓘImportant traits for FrameSequencepub fn right_to_left(&self) -> FrameSequence
[src]
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]
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]
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]
Returns a FrameSequence
iterator that moves the frames from the bottom to the bottom.
Trait Implementations
impl PartialEq<Scroll> for Scroll
[src]
impl Debug for Scroll
[src]
impl Index<usize> for Scroll
[src]
type Output = PixelFrame
The returned type after indexing.
fn index(&self, index: usize) -> &PixelFrame
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,