pub struct AudioFuture { /* private fields */ }Expand description
A future that resolves to extracted audio data.
Created via AudioHandle::extract_async or
similar async audio methods. The actual transcoding runs on a blocking
thread; polling this future drives it to completion.
§Example
use unbundle::{AudioFormat, ExtractOptions, MediaFile, UnbundleError};
let mut unbundler = MediaFile::open("input.mp4")?;
let config = ExtractOptions::new();
let audio_bytes = unbundler
.audio()
.extract_async(AudioFormat::Wav, config)?
.await?;
println!("Got {} bytes of audio", audio_bytes.len());Trait Implementations§
Source§impl Future for AudioFuture
impl Future for AudioFuture
Auto Trait Implementations§
impl Freeze for AudioFuture
impl RefUnwindSafe for AudioFuture
impl Send for AudioFuture
impl Sync for AudioFuture
impl Unpin for AudioFuture
impl UnwindSafe for AudioFuture
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more