Struct EncoderBuilder

pub struct EncoderBuilder { /* private fields */ }

Encoder builder. Allows to set y4m file parameters using builder pattern.

Implementations

impl EncoderBuilder

fn new(width: usize, height: usize, framerate: Ratio) -> EncoderBuilder

Create a new encoder builder.

fn with_colorspace(self, colorspace: Colorspace) -> Self

Specify file colorspace.

fn with_pixel_aspect(self, pixel_aspect: Ratio) -> Self

Specify file pixel aspect.

fn append_vendor_extension(self, x_option: VendorExtensionString) -> Self

Add vendor extension.

fn write_header<W: Write>(self, writer: W) -> Result<Encoder<W>, Error>

Write header to the stream and create encoder instance.

Trait Implementations

impl Debug for EncoderBuilder

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl Freeze for EncoderBuilder

impl RefUnwindSafe for EncoderBuilder

impl Send for EncoderBuilder

impl Sync for EncoderBuilder

impl Unpin for EncoderBuilder

impl UnsafeUnpin for EncoderBuilder

impl UnwindSafe for EncoderBuilder

Blanket Implementations

impl<T> Any for EncoderBuilder where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for EncoderBuilder where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for EncoderBuilder where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for EncoderBuilder

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for EncoderBuilder where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for EncoderBuilder where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for EncoderBuilder where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>