pub struct Animation(_);
Expand description

A lottie animation.

Implementations

Constructs an animation object from file path. This file needs to be in JSON format; if you want to read telegram’s tgs files, you need to decompress them first.

Note that the rlottie library might cache the file and/or its resources.

Constructs an animation object from JSON string data. External resources are resolved relative to resource_path.

Note that the cache_key might be used by the rlottie library to cache the json data and/or its resources.

This method will panic if json_data or cache_key contain nul bytes.

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.