Enum nokhwa::utils::RequestedFormatType
source · pub enum RequestedFormatType {
AbsoluteHighestResolution,
AbsoluteHighestFrameRate,
HighestResolution(Resolution),
HighestFrameRate(u32),
Exact(CameraFormat),
Closest(CameraFormat),
None,
}
Expand description
Tells the init function what camera format to pick.
AbsoluteHighestResolution
: Pick the highestResolution
, then pick the highest frame rate of those provided.AbsoluteHighestFrameRate
: Pick the highest frame rate, then the highestResolution
.HighestResolution(Option<u32>)
: Pick the highestResolution
for the given framerate (theOption<u32>
). If itsNone
, it will pick the highest possibleResolution
HighestFrameRate(Option<Resolution>)
: Pick the highest frame rate for the givenResolution
(theOption<Resolution>
). If it isNone
, it will pick the highest possinle framerate.Exact
: Pick the exactCameraFormat
provided.Closest
: Pick the closestCameraFormat
provided in order ofFrameFormat
,Resolution
, and FPS. Note that if theFrameFormat
does not exist, this will fail to resolve.None
: Pick a randomCameraFormat
Variants§
AbsoluteHighestResolution
AbsoluteHighestFrameRate
HighestResolution(Resolution)
HighestFrameRate(u32)
Exact(CameraFormat)
Closest(CameraFormat)
None
Trait Implementations§
source§impl Clone for RequestedFormatType
impl Clone for RequestedFormatType
source§fn clone(&self) -> RequestedFormatType
fn clone(&self) -> RequestedFormatType
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 Debug for RequestedFormatType
impl Debug for RequestedFormatType
source§impl Default for RequestedFormatType
impl Default for RequestedFormatType
source§fn default() -> RequestedFormatType
fn default() -> RequestedFormatType
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RequestedFormatType
impl<'de> Deserialize<'de> for RequestedFormatType
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<RequestedFormatType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<RequestedFormatType, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for RequestedFormatType
impl Display for RequestedFormatType
source§impl Hash for RequestedFormatType
impl Hash for RequestedFormatType
source§impl Ord for RequestedFormatType
impl Ord for RequestedFormatType
source§fn cmp(&self, other: &RequestedFormatType) -> Ordering
fn cmp(&self, other: &RequestedFormatType) -> 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 PartialEq<RequestedFormatType> for RequestedFormatType
impl PartialEq<RequestedFormatType> for RequestedFormatType
source§fn eq(&self, other: &RequestedFormatType) -> bool
fn eq(&self, other: &RequestedFormatType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<RequestedFormatType> for RequestedFormatType
impl PartialOrd<RequestedFormatType> for RequestedFormatType
source§fn partial_cmp(&self, other: &RequestedFormatType) -> Option<Ordering>
fn partial_cmp(&self, other: &RequestedFormatType) -> 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 moresource§impl Serialize for RequestedFormatType
impl Serialize for RequestedFormatType
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for RequestedFormatType
impl Eq for RequestedFormatType
impl StructuralEq for RequestedFormatType
impl StructuralPartialEq for RequestedFormatType
Auto Trait Implementations§
impl RefUnwindSafe for RequestedFormatType
impl Send for RequestedFormatType
impl Sync for RequestedFormatType
impl Unpin for RequestedFormatType
impl UnwindSafe for RequestedFormatType
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.