Enum RequestedFormatType
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 exact [CameraFormat
] provided.Closest
: Pick the closest [CameraFormat
] provided in order of [FrameFormat
],Resolution
, and FPS. Note that if the [FrameFormat
] does not exist, this will fail to resolve.None
: Pick a random [CameraFormat
]
Variants§
AbsoluteHighestResolution
AbsoluteHighestFrameRate
HighestResolution(Resolution)
HighestFrameRate(u32)
Exact(CameraFormat)
Closest(CameraFormat)
None
Trait Implementations§
§impl Clone for RequestedFormatType
impl Clone for RequestedFormatType
§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 more§impl Debug for RequestedFormatType
impl Debug for RequestedFormatType
§impl Default for RequestedFormatType
impl Default for RequestedFormatType
§fn default() -> RequestedFormatType
fn default() -> RequestedFormatType
Returns the “default value” for a type. Read more
§impl Display for RequestedFormatType
impl Display for RequestedFormatType
§impl Hash for RequestedFormatType
impl Hash for RequestedFormatType
§impl Ord for RequestedFormatType
impl Ord for RequestedFormatType
§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
§impl PartialEq for RequestedFormatType
impl PartialEq for RequestedFormatType
§impl PartialOrd for RequestedFormatType
impl PartialOrd for RequestedFormatType
impl Copy for RequestedFormatType
impl Eq for RequestedFormatType
impl StructuralPartialEq for RequestedFormatType
Auto Trait Implementations§
impl Freeze for RequestedFormatType
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.