pub struct CodecPreferences {
pub prefer: Vec<String>,
pub exclude: Vec<String>,
pub no_hardware: bool,
pub boost: i32,
}Expand description
User preferences for codec selection — pass to the registry’s resolve methods to bias / restrict the choice.
Fields§
§prefer: Vec<String>Implementation names to prefer (boost their priority by boost).
exclude: Vec<String>Implementation names to skip entirely.
no_hardware: boolForbid hardware-accelerated impls.
boost: i32Boost amount for prefer impls (subtracted from priority).
Implementations§
Source§impl CodecPreferences
impl CodecPreferences
pub fn excludes(&self, caps: &CodecCapabilities) -> bool
pub fn effective_priority(&self, caps: &CodecCapabilities) -> i32
Trait Implementations§
Source§impl Clone for CodecPreferences
impl Clone for CodecPreferences
Source§fn clone(&self) -> CodecPreferences
fn clone(&self) -> CodecPreferences
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodecPreferences
impl Debug for CodecPreferences
Source§impl Default for CodecPreferences
impl Default for CodecPreferences
Source§fn default() -> CodecPreferences
fn default() -> CodecPreferences
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CodecPreferences
impl RefUnwindSafe for CodecPreferences
impl Send for CodecPreferences
impl Sync for CodecPreferences
impl Unpin for CodecPreferences
impl UnsafeUnpin for CodecPreferences
impl UnwindSafe for CodecPreferences
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