Struct rusty_spine::Attachment
source · pub struct Attachment { /* private fields */ }
Expand description
Slot attachments.
Attachments are reference counted and can be stored and worked with directly, however, some of
the underlying data that attachments point to may be cleared. For this reason, attachments
should be used with caution, and only used so long as the
SkeletonData
they came from remains valid, and only attached to the
slot they are meant for.
Implementations§
source§impl Attachment
impl Attachment
sourcepub fn as_region(&self) -> Option<RegionAttachment>
pub fn as_region(&self) -> Option<RegionAttachment>
Get this attachment as a RegionAttachment
, or None
if it’s a different type.
sourcepub fn as_bounding_box(&self) -> Option<BoundingBoxAttachment>
pub fn as_bounding_box(&self) -> Option<BoundingBoxAttachment>
Get this attachment as a BoundingBoxAttachment
, or None
if it’s a different type.
sourcepub fn as_mesh(&self) -> Option<MeshAttachment>
pub fn as_mesh(&self) -> Option<MeshAttachment>
Get this attachment as a MeshAttachment
, or None
if it’s a different type.
sourcepub fn as_point(&self) -> Option<PointAttachment>
pub fn as_point(&self) -> Option<PointAttachment>
Get this attachment as a PointAttachment
, or None
if it’s a different type.
sourcepub fn as_clipping(&self) -> Option<ClippingAttachment>
pub fn as_clipping(&self) -> Option<ClippingAttachment>
Get this attachment as a ClippingAttachment
, or None
if it’s a different type.
sourcepub fn attachment_type(&self) -> AttachmentType
pub fn attachment_type(&self) -> AttachmentType
The attachment’s type.
sourcepub const fn c_ptr(&self) -> *mut spAttachment
pub const fn c_ptr(&self) -> *mut spAttachment
Get a pointer to the underlying spine-c
type.