pub struct SpriteClip { /* private fields */ }Implementations§
Source§impl SpriteClip
impl SpriteClip
pub fn new( name: impl Into<String>, frames: Vec<usize>, fps: f32, playback: Playback, ) -> Result<Self, AnimError>
pub fn with_events(self, events: Vec<FrameEvent>) -> Result<Self, AnimError>
pub fn name(&self) -> &str
pub fn frames(&self) -> &[usize]
pub fn fps(&self) -> f32
pub fn playback(&self) -> Playback
pub fn events(&self) -> &[FrameEvent]
pub fn position(&self, step: u64) -> usize
Trait Implementations§
Source§impl Clone for SpriteClip
impl Clone for SpriteClip
Source§fn clone(&self) -> SpriteClip
fn clone(&self) -> SpriteClip
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpriteClip
impl Debug for SpriteClip
Source§impl PartialEq for SpriteClip
impl PartialEq for SpriteClip
Source§fn eq(&self, other: &SpriteClip) -> bool
fn eq(&self, other: &SpriteClip) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SpriteClip
Auto Trait Implementations§
impl Freeze for SpriteClip
impl RefUnwindSafe for SpriteClip
impl Send for SpriteClip
impl Sync for SpriteClip
impl Unpin for SpriteClip
impl UnsafeUnpin for SpriteClip
impl UnwindSafe for SpriteClip
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more