[−][src]Struct sensehat_screen::scroll::Scroll
A type representing a collection of PixelFrame
s that may be scrolled.
Implementations
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.
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]
Notable traits for FrameSequence
impl Iterator for FrameSequence type Item = PixelFrame;
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]
Notable traits for FrameSequence
impl Iterator for FrameSequence type Item = PixelFrame;
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]
Notable traits for FrameSequence
impl Iterator for FrameSequence type Item = PixelFrame;
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]
Notable traits for FrameSequence
impl Iterator for FrameSequence type Item = PixelFrame;
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.
fn index(&self, index: usize) -> &PixelFrame
[src]
impl PartialEq<Scroll> for Scroll
[src]
impl StructuralPartialEq for Scroll
[src]
Auto Trait Implementations
impl RefUnwindSafe for Scroll
[src]
impl Send for Scroll
[src]
impl Sync for Scroll
[src]
impl Unpin for Scroll
[src]
impl UnwindSafe for Scroll
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,