Struct rusty_spine::Skeleton

source ·
pub struct Skeleton { /* private fields */ }
Expand description

A live Skeleton instance created from SkeletonData.

Spine API Reference

Implementations

Create a new instance of the skeleton loaded in SkeletonData.

See SkeletonJson or SkeletonBinary for a complete example of loading a skeleton.

Set the skeleton’s skin. If the skin is a user-created one (via Skin::new), then a clone is created and used instead, to help ensure memory safety. If this behavior is not desired then Skeleton::set_skin_unchecked can be used instead.

Set the skeleton’s skin.

Safety

The Skin struct will destroy the underlying C representation of the skin in its Drop implementation. Skins assigned to a skeleton must live as long as the skeletons using them or else the skeleton may cause a segfault.

Set the skeleton’s skin by name.

Safety

This function should only be called with valid skin names. It is faster than the safe alternative, Skeleton::set_skin_by_name, but will likely segfault if the skin does not exist.

Set the skeleton’s skin by name.

Functions available if using the mint feature.

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.