Skip to main content

AtlasAttachmentLoader

Struct AtlasAttachmentLoader 

Source
pub struct AtlasAttachmentLoader<'atlas> { /* private fields */ }
Expand description

Resolves regions against an Atlas by name. Never fails: a frame whose region is missing stays None, as in spine-cpp, and SkeletonRenderer skips drawing it.

Implementations§

Source§

impl<'atlas> AtlasAttachmentLoader<'atlas>

Source

pub fn new(atlas: &'atlas Atlas) -> Self

A loader that looks regions up in atlas.

Trait Implementations§

Source§

impl AttachmentLoader for AtlasAttachmentLoader<'_>

Source§

fn new_region_attachment( &mut self, _skin: &str, _placeholder: &str, name: &str, path: &str, sequence: Sequence, ) -> Result<Option<RegionAttachment>, AttachmentLoaderError>

A region attachment. path is its atlas path; sequence has one entry per frame, and Sequence::path gives each frame’s path. Read more
Source§

fn new_mesh_attachment( &mut self, _skin: &str, _placeholder: &str, name: &str, path: &str, sequence: Sequence, ) -> Result<Option<MeshAttachment>, AttachmentLoaderError>

A mesh attachment, including linked meshes. Arguments as for Self::new_region_attachment. Read more
Source§

fn new_bounding_box_attachment( &mut self, skin: &str, placeholder: &str, name: &str, ) -> Result<Option<BoundingBoxAttachment>, AttachmentLoaderError>

Errors Read more
Source§

fn new_path_attachment( &mut self, skin: &str, placeholder: &str, name: &str, ) -> Result<Option<PathAttachment>, AttachmentLoaderError>

Errors Read more
Source§

fn new_point_attachment( &mut self, skin: &str, placeholder: &str, name: &str, ) -> Result<Option<PointAttachment>, AttachmentLoaderError>

Errors Read more
Source§

fn new_clipping_attachment( &mut self, skin: &str, placeholder: &str, name: &str, ) -> Result<Option<ClippingAttachment>, AttachmentLoaderError>

Errors Read more

Auto Trait Implementations§

§

impl<'atlas> Freeze for AtlasAttachmentLoader<'atlas>

§

impl<'atlas> RefUnwindSafe for AtlasAttachmentLoader<'atlas>

§

impl<'atlas> Send for AtlasAttachmentLoader<'atlas>

§

impl<'atlas> Sync for AtlasAttachmentLoader<'atlas>

§

impl<'atlas> Unpin for AtlasAttachmentLoader<'atlas>

§

impl<'atlas> UnsafeUnpin for AtlasAttachmentLoader<'atlas>

§

impl<'atlas> UnwindSafe for AtlasAttachmentLoader<'atlas>

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.