pub enum Supported<I> {
All,
Specific(I),
}Variants§
Implementations§
Source§impl<T, I> Supported<I>
impl<T, I> Supported<I>
Sourcepub fn all(&self) -> bool
pub fn all(&self) -> bool
Check if all possible configuration values are supported.
§Example
use ffmpeg_the_third::codec::{encoder, Id};
let codec = encoder::find(Id::VP9)
.expect("Can find a VP9 encoder")
.video()
.unwrap();
let supported = codec.supported_rates();
assert!(supported.all())Sourcepub fn supports(self, t: T) -> bool
pub fn supports(self, t: T) -> bool
Check if a specific configuration value is supported.
§Example
use ffmpeg_the_third::codec::{decoder, Id};
use ffmpeg_the_third::format::sample::{Sample, Type};
let codec = decoder::find(Id::MP3)
.expect("Can find an MP3 decoder")
.audio()
.unwrap();
let supported = codec.supported_formats();
assert!(supported.supports(Sample::F32(Type::Planar)));Trait Implementations§
Auto Trait Implementations§
impl<I> Freeze for Supported<I>where
I: Freeze,
impl<I> RefUnwindSafe for Supported<I>where
I: RefUnwindSafe,
impl<I> Send for Supported<I>where
I: Send,
impl<I> Sync for Supported<I>where
I: Sync,
impl<I> Unpin for Supported<I>where
I: Unpin,
impl<I> UnsafeUnpin for Supported<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for Supported<I>where
I: UnwindSafe,
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