pub struct ClosestToIdealPolicy { /* private fields */ }
Expand description
A tie-breaking policy that picks the settings item that’s closest to the specified ideal settings.
Implementations§
Source§impl ClosestToIdealPolicy
impl ClosestToIdealPolicy
Sourcepub fn new(
ideal_settings: MediaTrackSettings,
supported_constraints: &MediaTrackSupportedConstraints,
) -> Self
pub fn new( ideal_settings: MediaTrackSettings, supported_constraints: &MediaTrackSupportedConstraints, ) -> Self
Creates a new policy from the given ideal settings and supported constraints.
Trait Implementations§
Source§impl TieBreakingPolicy for ClosestToIdealPolicy
impl TieBreakingPolicy for ClosestToIdealPolicy
Source§fn select_candidate<'b, I>(&self, candidates: I) -> &'b MediaTrackSettingswhere
I: IntoIterator<Item = &'b MediaTrackSettings>,
fn select_candidate<'b, I>(&self, candidates: I) -> &'b MediaTrackSettingswhere
I: IntoIterator<Item = &'b MediaTrackSettings>,
Selects a preferred candidate from a non-empty selection of optimal candidates. Read more
Auto Trait Implementations§
impl Freeze for ClosestToIdealPolicy
impl RefUnwindSafe for ClosestToIdealPolicy
impl Send for ClosestToIdealPolicy
impl Sync for ClosestToIdealPolicy
impl Unpin for ClosestToIdealPolicy
impl UnwindSafe for ClosestToIdealPolicy
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