pub struct RendererObject<'a> { /* private fields */ }
Expand description

A wrapper around a user data void pointer found on a few Spine C structs.

The Spine C runtime sets this automatically to the attachment’s atlas region for region and mesh attachments if using the default atlas attachment loader. In this case, get_atlas_region can be used to get the Rust struct.

The value can be set manually but will panic if the value is already set. The previous value can be disposed using dispose, but only if the value was allocated in Rust. The value can be forgotten using forget, but this can cause a memory leak.

Implementations

Set the renderer object to a Rust object. Panics if the renderer object is already set. Must be manually freed later using dispose.

Gets the type pointed to by this renderer object. It is not guaranteed that the returned option has a valid object and could segfault if the renderer object is a different type.

Gets the atlas region on mesh and region attachments if the default attachment loader was used to create the skeleton. This function does not guarantee that the returned option has a valid AtlasRegion and could segfault if the renderer object is a different type.

Drop the underlying data. This only works for Rust types and might segfault if the type was allocated in C.

Set renderer object to null, potentially leaking the memory previously pointed to.

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.