pub struct ProxyFormatMatcher { /* private fields */ }Expand description
Matcher that selects the best compatible proxy format for a given resolution.
Implementations§
Source§impl ProxyFormatMatcher
impl ProxyFormatMatcher
Sourcepub fn standard() -> Self
pub fn standard() -> Self
Create a matcher pre-populated with common broadcast/editing formats.
Sourcepub fn add(&mut self, compat: FormatCompat)
pub fn add(&mut self, compat: FormatCompat)
Add a format compatibility entry.
Sourcepub fn find_compatible(&self, width: u32, height: u32) -> Vec<&FormatCompat>
pub fn find_compatible(&self, width: u32, height: u32) -> Vec<&FormatCompat>
Return all entries whose resolution limit accommodates the given dimensions.
Sourcepub fn best_match(&self, width: u32, height: u32) -> Option<&FormatCompat>
pub fn best_match(&self, width: u32, height: u32) -> Option<&FormatCompat>
Return the best match: preferred first, then highest-resolution limit.
Trait Implementations§
Source§impl Debug for ProxyFormatMatcher
impl Debug for ProxyFormatMatcher
Source§impl Default for ProxyFormatMatcher
impl Default for ProxyFormatMatcher
Source§fn default() -> ProxyFormatMatcher
fn default() -> ProxyFormatMatcher
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProxyFormatMatcher
impl RefUnwindSafe for ProxyFormatMatcher
impl Send for ProxyFormatMatcher
impl Sync for ProxyFormatMatcher
impl Unpin for ProxyFormatMatcher
impl UnsafeUnpin for ProxyFormatMatcher
impl UnwindSafe for ProxyFormatMatcher
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more