Struct rusty_spine::TrackEntryHandle
source · pub struct TrackEntryHandle { /* private fields */ }
Expand description
A storeable reference to a TrackEntry
.
Can be acquired from a
CTmpRef<AnimationState, TrackEntry>
or CTmpMut<AnimationState, TrackEntry>
acquired
from an AnimationState
instance.
let track_entry_handles: Vec<TrackEntryHandle> = animation_state.tracks().map(|track| track.unwrap().handle()).collect();
for track_entry_handle in track_entry_handles.iter() {
let track_entry = track_entry_handle.get(&animation_state).unwrap();
println!("{}", track_entry.animation().name());
}
Implementations§
source§impl TrackEntryHandle
impl TrackEntryHandle
sourcepub fn get<'a>(
&self,
parent: &'a AnimationState
) -> Option<CTmpRef<'a, AnimationState, TrackEntry>>
pub fn get<'a>( &self, parent: &'a AnimationState ) -> Option<CTmpRef<'a, AnimationState, TrackEntry>>
Safely acquired the item, verifying its existence using its parent.
sourcepub fn get_mut<'a>(
&self,
parent: &'a mut AnimationState
) -> Option<CTmpMut<'a, AnimationState, TrackEntry>>
pub fn get_mut<'a>( &self, parent: &'a mut AnimationState ) -> Option<CTmpMut<'a, AnimationState, TrackEntry>>
Safely acquired the item, verifying its existence using its parent.
sourcepub unsafe fn get_unchecked(&self) -> TrackEntry
pub unsafe fn get_unchecked(&self) -> TrackEntry
§Safety
Acquire the item without any checks. This is a direct pointer access which is fast but will segfault if the data has been disposed of already.
Trait Implementations§
source§impl Clone for TrackEntryHandle
impl Clone for TrackEntryHandle
source§fn clone(&self) -> TrackEntryHandle
fn clone(&self) -> TrackEntryHandle
Returns a copy of the value. Read more
1.0.0 · 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 TrackEntryHandle
impl Debug for TrackEntryHandle
source§impl PartialEq for TrackEntryHandle
impl PartialEq for TrackEntryHandle
source§fn eq(&self, other: &TrackEntryHandle) -> bool
fn eq(&self, other: &TrackEntryHandle) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TrackEntryHandle
impl Eq for TrackEntryHandle
impl StructuralPartialEq for TrackEntryHandle
Auto Trait Implementations§
impl Freeze for TrackEntryHandle
impl RefUnwindSafe for TrackEntryHandle
impl Send for TrackEntryHandle
impl Sync for TrackEntryHandle
impl Unpin for TrackEntryHandle
impl UnwindSafe for TrackEntryHandle
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