pub struct ModeId {
pub format: MediaFormat,
pub interval: Option<Interval>,
}Expand description
Identifier for a capture mode keyed by its format and optional interval.
§Example
use styx_capture::prelude::*;
let res = Resolution::new(640, 480).unwrap();
let format = MediaFormat::new(FourCc::new(*b"RG24"), res, ColorSpace::Srgb);
let id = ModeId { format, interval: None };
assert_eq!(id.format.code.to_string(), "RG24");Fields§
§format: MediaFormatPixel format and resolution for this mode.
interval: Option<Interval>Optional interval associated with this mode (if the mode is interval-specific).
Trait Implementations§
impl Eq for ModeId
impl StructuralPartialEq for ModeId
Auto Trait Implementations§
impl Freeze for ModeId
impl RefUnwindSafe for ModeId
impl Send for ModeId
impl Sync for ModeId
impl Unpin for ModeId
impl UnwindSafe for ModeId
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,
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