[][src]Struct silver_animation::Linear

pub struct Linear<T, DrawFunc, MaxFrames> where
    DrawFunc: Fn(&mut T, usize, &mut Graphics, Rectangle) -> Result<()>,
    MaxFrames: Fn(&T) -> usize
{ /* fields omitted */ }

The backbone of both Linear animation systems.

Implementations

impl<T, DrawFunc, MaxFrames> Linear<T, DrawFunc, MaxFrames> where
    DrawFunc: Fn(&mut T, usize, &mut Graphics, Rectangle) -> Result<()>,
    MaxFrames: Fn(&T) -> usize
[src]

pub fn new(config: LinearConfig<T, DrawFunc, MaxFrames>) -> Self[src]

Create a new animation.

pub fn draw(&mut self, gfx: &mut Graphics, location: Rectangle) -> Result<()>[src]

Draw the animation.

pub fn contain(
    self,
    location: Rectangle
) -> BasicAnimationContainer<Self, Vector, Rectangle>
[src]

Trait Implementations

impl<T, DrawFunc, MaxFrames> BasicAnimation<Vector, Rectangle> for Linear<T, DrawFunc, MaxFrames> where
    DrawFunc: Fn(&mut T, usize, &mut Graphics, Rectangle) -> Result<()>,
    MaxFrames: Fn(&T) -> usize
[src]

impl<T, DrawFunc, MaxFrames> Resetable for Linear<T, DrawFunc, MaxFrames> where
    DrawFunc: Fn(&mut T, usize, &mut Graphics, Rectangle) -> Result<()>,
    MaxFrames: Fn(&T) -> usize
[src]

Auto Trait Implementations

impl<T, DrawFunc, MaxFrames> RefUnwindSafe for Linear<T, DrawFunc, MaxFrames> where
    DrawFunc: RefUnwindSafe,
    MaxFrames: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, DrawFunc, MaxFrames> Send for Linear<T, DrawFunc, MaxFrames> where
    DrawFunc: Send,
    MaxFrames: Send,
    T: Send

impl<T, DrawFunc, MaxFrames> Sync for Linear<T, DrawFunc, MaxFrames> where
    DrawFunc: Sync,
    MaxFrames: Sync,
    T: Sync

impl<T, DrawFunc, MaxFrames> Unpin for Linear<T, DrawFunc, MaxFrames> where
    DrawFunc: Unpin,
    MaxFrames: Unpin,
    T: Unpin

impl<T, DrawFunc, MaxFrames> UnwindSafe for Linear<T, DrawFunc, MaxFrames> where
    DrawFunc: UnwindSafe,
    MaxFrames: UnwindSafe,
    T: UnwindSafe

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.