#[non_exhaustive]pub enum ImageFormat {
Png,
Jpeg(u8),
}Expand description
Image format specification for encoding video frames.
Used with VideoFrame::encode_data_url to specify the desired output format.
§Examples
use grafton_ndi::ImageFormat;
// PNG format (lossless)
let png = ImageFormat::Png;
// JPEG with quality 85 (lossy, smaller file size)
let jpeg = ImageFormat::Jpeg(85);This enum is marked #[non_exhaustive] so that additional encoders can be
added without a breaking change. Match arms should include a wildcard _
pattern.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Png
PNG format (lossless compression)
Jpeg(u8)
JPEG format with quality setting (1-100, where 100 is highest quality)
Trait Implementations§
Source§impl Clone for ImageFormat
impl Clone for ImageFormat
Source§fn clone(&self) -> ImageFormat
fn clone(&self) -> ImageFormat
Returns a duplicate 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 ImageFormat
impl Debug for ImageFormat
Source§impl PartialEq for ImageFormat
impl PartialEq for ImageFormat
impl Copy for ImageFormat
impl Eq for ImageFormat
impl StructuralPartialEq for ImageFormat
Auto Trait Implementations§
impl Freeze for ImageFormat
impl RefUnwindSafe for ImageFormat
impl Send for ImageFormat
impl Sync for ImageFormat
impl Unpin for ImageFormat
impl UnsafeUnpin for ImageFormat
impl UnwindSafe for ImageFormat
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