Struct servo_media_audio::block::FrameRef
source · pub struct FrameRef<'a> {
frame: Tick,
block: &'a mut Block,
}
Expand description
A reference to a frame
Fields§
§frame: Tick
§block: &'a mut Block
Implementations§
source§impl<'a> FrameRef<'a>
impl<'a> FrameRef<'a>
pub fn tick(&self) -> Tick
sourcepub fn mutate_with<F>(&mut self, f: F)
pub fn mutate_with<F>(&mut self, f: F)
Given a block and a function f
, mutate the frame through all channels with f
Use this when you plan to do the same operation for each channel. (Helpers for the other cases will eventually exist)
Block must not be silence
The second parameter to f is the channel number, 0 in case of a repeat()
Auto Trait Implementations§
impl<'a> Freeze for FrameRef<'a>
impl<'a> RefUnwindSafe for FrameRef<'a>
impl<'a> Send for FrameRef<'a>
impl<'a> Sync for FrameRef<'a>
impl<'a> Unpin for FrameRef<'a>
impl<'a> !UnwindSafe for FrameRef<'a>
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