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
sourceimpl 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<'a>(&self) -> TrackEntry
pub unsafe fn get_unchecked<'a>(&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
sourceimpl Clone for TrackEntryHandle
impl Clone for TrackEntryHandle
sourcefn clone(&self) -> TrackEntryHandle
fn clone(&self) -> TrackEntryHandle
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for TrackEntryHandle
impl Debug for TrackEntryHandle
sourceimpl PartialEq<TrackEntryHandle> for TrackEntryHandle
impl PartialEq<TrackEntryHandle> for TrackEntryHandle
sourcefn eq(&self, other: &TrackEntryHandle) -> bool
fn eq(&self, other: &TrackEntryHandle) -> bool
impl Copy for TrackEntryHandle
impl Eq for TrackEntryHandle
impl StructuralEq for TrackEntryHandle
impl StructuralPartialEq for TrackEntryHandle
Auto Trait Implementations
impl RefUnwindSafe for TrackEntryHandle
impl Send for TrackEntryHandle
impl Sync for TrackEntryHandle
impl Unpin for TrackEntryHandle
impl UnwindSafe for TrackEntryHandle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more