Struct nokhwa::utils::RequestedFormat
source · pub struct RequestedFormat<'a> { /* private fields */ }
Expand description
A request to the camera for a valid CameraFormat
Implementations§
source§impl RequestedFormat<'_>
impl RequestedFormat<'_>
sourcepub fn new<Decoder>(requested: RequestedFormatType) -> RequestedFormat<'static>where
Decoder: FormatDecoder,
pub fn new<Decoder>(requested: RequestedFormatType) -> RequestedFormat<'static>where Decoder: FormatDecoder,
Creates a new RequestedFormat
by using the RequestedFormatType
and getting the FrameFormat
constraints from a generic type.
sourcepub fn with_formats(
requested: RequestedFormatType,
decoder: &[FrameFormat]
) -> RequestedFormat<'_>
pub fn with_formats( requested: RequestedFormatType, decoder: &[FrameFormat] ) -> RequestedFormat<'_>
Creates a new RequestedFormat
by using the RequestedFormatType
and getting the FrameFormat
constraints from a statically allocated slice.
sourcepub fn requested_format_type(&self) -> RequestedFormatType
pub fn requested_format_type(&self) -> RequestedFormatType
Gets the RequestedFormatType
sourcepub fn fulfill(&self, all_formats: &[CameraFormat]) -> Option<CameraFormat>
pub fn fulfill(&self, all_formats: &[CameraFormat]) -> Option<CameraFormat>
Fulfill the requested using a list of all available formats.
See RequestedFormatType
for more details.
Trait Implementations§
source§impl<'a> Clone for RequestedFormat<'a>
impl<'a> Clone for RequestedFormat<'a>
source§fn clone(&self) -> RequestedFormat<'a>
fn clone(&self) -> RequestedFormat<'a>
Returns a copy 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<'a> Debug for RequestedFormat<'a>
impl<'a> Debug for RequestedFormat<'a>
source§impl Display for RequestedFormat<'_>
impl Display for RequestedFormat<'_>
source§impl<'a> Hash for RequestedFormat<'a>
impl<'a> Hash for RequestedFormat<'a>
source§impl<'a> Ord for RequestedFormat<'a>
impl<'a> Ord for RequestedFormat<'a>
source§fn cmp(&self, other: &RequestedFormat<'a>) -> Ordering
fn cmp(&self, other: &RequestedFormat<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq<RequestedFormat<'a>> for RequestedFormat<'a>
impl<'a> PartialEq<RequestedFormat<'a>> for RequestedFormat<'a>
source§fn eq(&self, other: &RequestedFormat<'a>) -> bool
fn eq(&self, other: &RequestedFormat<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd<RequestedFormat<'a>> for RequestedFormat<'a>
impl<'a> PartialOrd<RequestedFormat<'a>> for RequestedFormat<'a>
source§fn partial_cmp(&self, other: &RequestedFormat<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &RequestedFormat<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'a> Copy for RequestedFormat<'a>
impl<'a> Eq for RequestedFormat<'a>
impl<'a> StructuralEq for RequestedFormat<'a>
impl<'a> StructuralPartialEq for RequestedFormat<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for RequestedFormat<'a>
impl<'a> Send for RequestedFormat<'a>
impl<'a> Sync for RequestedFormat<'a>
impl<'a> Unpin for RequestedFormat<'a>
impl<'a> UnwindSafe for RequestedFormat<'a>
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.