pub struct Track<const N: usize> { /* private fields */ }Expand description
A fixed-capacity, tick-sorted track of N events.
Implementations§
Source§impl<const N: usize> Track<N>
impl<const N: usize> Track<N>
Sourcepub fn insert(&mut self, event: TimedEvent) -> Result<(), AudioError>
pub fn insert(&mut self, event: TimedEvent) -> Result<(), AudioError>
Insert an event, keeping the track sorted by tick (stable for equal
ticks). This is a cold, loading-time operation — not for the audio
thread. Returns AudioError::OutputBufferTooSmall if the track is full.
Sourcepub fn events(&self) -> &[TimedEvent]
pub fn events(&self) -> &[TimedEvent]
All stored events, in tick order.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for Track<N>
impl<const N: usize> RefUnwindSafe for Track<N>
impl<const N: usize> Send for Track<N>
impl<const N: usize> Sync for Track<N>
impl<const N: usize> Unpin for Track<N>
impl<const N: usize> UnsafeUnpin for Track<N>
impl<const N: usize> UnwindSafe for Track<N>
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