pub struct Animation(_);
Expand description

A lottie animation.

Implementations

Read a lottie animation from file. This file needs to be in JSON format; if you want to read telegram’s tgs files, you need to decompress them first.

Read a file from memory. External resources are resolved relative to resource_path.

Return the default viewport size of this animation.

Return the total duration of this animation in seconds.

Return the total number of frames in this animation.

Return the default framerate of this animation.

Maps position to frame number and returns it.

Render the contents of a frame onto the surface.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.