pub struct VideoPortFormat {
pub pixel_format: Option<PixelFormat>,
pub width: Option<u32>,
pub height: Option<u32>,
}Expand description
Video port format specification.
Fields§
§pixel_format: Option<PixelFormat>Pixel format (or None for any).
width: Option<u32>Frame width (or None for any).
height: Option<u32>Frame height (or None for any).
Implementations§
Source§impl VideoPortFormat
impl VideoPortFormat
Sourcepub fn new(pixel_format: PixelFormat) -> Self
pub fn new(pixel_format: PixelFormat) -> Self
Create a new video format with specific pixel format.
Sourcepub fn with_dimensions(self, width: u32, height: u32) -> Self
pub fn with_dimensions(self, width: u32, height: u32) -> Self
Set the dimensions.
Sourcepub fn is_compatible(&self, other: &Self) -> bool
pub fn is_compatible(&self, other: &Self) -> bool
Check if compatible with another video format.
Trait Implementations§
Source§impl Clone for VideoPortFormat
impl Clone for VideoPortFormat
Source§fn clone(&self) -> VideoPortFormat
fn clone(&self) -> VideoPortFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VideoPortFormat
impl Debug for VideoPortFormat
Source§impl Default for VideoPortFormat
impl Default for VideoPortFormat
Source§impl Display for VideoPortFormat
impl Display for VideoPortFormat
Source§impl PartialEq for VideoPortFormat
impl PartialEq for VideoPortFormat
Source§fn eq(&self, other: &VideoPortFormat) -> bool
fn eq(&self, other: &VideoPortFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VideoPortFormat
Auto Trait Implementations§
impl Freeze for VideoPortFormat
impl RefUnwindSafe for VideoPortFormat
impl Send for VideoPortFormat
impl Sync for VideoPortFormat
impl Unpin for VideoPortFormat
impl UnsafeUnpin for VideoPortFormat
impl UnwindSafe for VideoPortFormat
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