Enum nokhwa::utils::FrameFormat
source · pub enum FrameFormat {
MJPEG,
YUYV,
NV12,
GRAY,
RAWRGB,
}
Expand description
Describes a frame format (i.e. how the bytes themselves are encoded). Often called FourCC
.
- YUYV is a mathematical color space. You can read more here.
- NV12 is same as above. Note that a partial compression (e.g. [16, 235] may be coerced to [0, 255].
- MJPEG is a motion-jpeg compressed frame, it allows for high frame rates.
- GRAY is a grayscale image format, usually for specialized cameras such as IR Cameras.
- RAWRGB is a Raw RGB888 format.
Variants§
Trait Implementations§
source§impl Clone for FrameFormat
impl Clone for FrameFormat
source§fn clone(&self) -> FrameFormat
fn clone(&self) -> FrameFormat
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 FrameFormat
impl Debug for FrameFormat
source§impl<'de> Deserialize<'de> for FrameFormat
impl<'de> Deserialize<'de> for FrameFormat
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<FrameFormat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<FrameFormat, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for FrameFormat
impl Display for FrameFormat
source§impl FromStr for FrameFormat
impl FromStr for FrameFormat
§type Err = NokhwaError
type Err = NokhwaError
The associated error which can be returned from parsing.
source§fn from_str(s: &str) -> Result<FrameFormat, <FrameFormat as FromStr>::Err>
fn from_str(s: &str) -> Result<FrameFormat, <FrameFormat as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moresource§impl Hash for FrameFormat
impl Hash for FrameFormat
source§impl Ord for FrameFormat
impl Ord for FrameFormat
source§fn cmp(&self, other: &FrameFormat) -> Ordering
fn cmp(&self, other: &FrameFormat) -> 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<FrameFormat> for FrameFormat
impl PartialEq<FrameFormat> for FrameFormat
source§fn eq(&self, other: &FrameFormat) -> bool
fn eq(&self, other: &FrameFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<FrameFormat> for FrameFormat
impl PartialOrd<FrameFormat> for FrameFormat
source§fn partial_cmp(&self, other: &FrameFormat) -> Option<Ordering>
fn partial_cmp(&self, other: &FrameFormat) -> 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 FrameFormat
impl Serialize for FrameFormat
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 FrameFormat
impl Eq for FrameFormat
impl StructuralEq for FrameFormat
impl StructuralPartialEq for FrameFormat
Auto Trait Implementations§
impl RefUnwindSafe for FrameFormat
impl Send for FrameFormat
impl Sync for FrameFormat
impl Unpin for FrameFormat
impl UnwindSafe for FrameFormat
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.