Struct rusty_spine::SlotData

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

Static slot data imported from Spine.

Spine API Reference

Implementations§

source§

impl SlotData

source

pub fn set_attachment_name(&mut self, attachment_name: &str)

source

pub fn index(&self) -> usize

The index of the slot in Skeleton::slots.

source

pub fn name(&self) -> &str

The name of the slot, which is unique across all slots in the skeleton.

source

pub fn bone_data(&self) -> CTmpRef<'_, Self, BoneData>

The bone this slot belongs to.

source

pub fn attachment_name(&self) -> Option<&str>

The name of the attachment that is visible for this slot in the setup pose, or None if no attachment is visible.

source

pub fn color(&self) -> Color

The color used to tint the slot’s attachment. If dark_color is set, this is used as the light color for two color tinting.

source

pub fn dark_color(&self) -> Option<Color>

The dark color used to tint the slot’s attachment for two color tinting, or None if two color tinting is not used. The dark color’s alpha is not used.

source

pub fn blend_mode(&self) -> BlendMode

The blend mode for drawing the slot’s attachment.

source

pub const fn c_ptr(&self) -> *mut spSlotData

Get a pointer to the underlying spine-c type.

Trait Implementations§

source§

impl Debug for SlotData

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl NewFromPtr<spSlotData> for SlotData

source§

unsafe fn new_from_ptr(c_slot_data: *mut spSlotData) -> Self

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.