[][src]Struct pathfinder::map::gif::Gif

pub struct Gif<'a> { /* fields omitted */ }

Wrapper around the Gif struct found in the gif crate.

With additions for pathfinder support, and cycling features.

Methods

impl<'a> Gif<'a>[src]

pub fn new(filename: &str, width: u16, height: u16) -> Self[src]

Constructs a Gif struct and initializes a file on the system for the Gif to be stored.

Errors

If it is unable to create the Encoder, or if the file can not be created.

See also

examples/hello_world_gif.rs example/cycles.rs

pub fn cycle(&mut self, interval: u8, map: Vec<Node>)[src]

Adds in a repeating patttern every interval frame on to the gif image.

See also

examples/cycles.rs

pub fn cycle_predicate(
    &mut self,
    interval: u8,
    map: Vec<Node>,
    predicate: &'a dyn Fn(&Node) -> Node
)
[src]

Adds in a repeating patttern every interval frame on to the gif image.

pub fn remove_cycles(&mut self)[src]

Removes all cycles from the gif.

pub fn advance_cycle(&mut self) -> Vec<Node>[src]

Advances the cycles and returns the patterns it matched.

pub fn frames(&self) -> u16[src]

Returns the number of frames that has been written.

pub fn push(&mut self, map: Map) -> Result<(), Error>[src]

Pushes a frame using a map struct.

pub fn push_frame(&mut self, image: &IW) -> Result<(), Error>[src]

Pushes a frame to the structure, This also immediately saves it to disk.

Errors

If the encoder fails to write the frame to disk.

pub fn blank(&mut self) -> Result<(), Error>[src]

Appends a blank frame to the gif.

This will also advance Gif cycles.

Auto Trait Implementations

impl<'a> !Sync for Gif<'a>

impl<'a> Unpin for Gif<'a>

impl<'a> !Send for Gif<'a>

impl<'a> !UnwindSafe for Gif<'a>

impl<'a> !RefUnwindSafe for Gif<'a>

Blanket Implementations

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.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.