Skip to main content

HandlerReferenceAtomBuilder

Struct HandlerReferenceAtomBuilder 

Source
pub struct HandlerReferenceAtomBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> HandlerReferenceAtomBuilder<S>

Source

pub fn build(self) -> HandlerReferenceAtom
where S: IsComplete,

Finish building and return the requested object

Source

pub fn version(self, value: u8) -> HandlerReferenceAtomBuilder<SetVersion<S>>
where S::Version: IsUnset,

Optional (Some / Option setters). Default: 0.

Version of the hdlr atom format (0)

Source

pub fn maybe_version( self, value: Option<u8>, ) -> HandlerReferenceAtomBuilder<SetVersion<S>>
where S::Version: IsUnset,

Optional (Some / Option setters). Default: 0.

Version of the hdlr atom format (0)

Source

pub fn flags(self, value: [u8; 3]) -> HandlerReferenceAtomBuilder<SetFlags<S>>
where S::Flags: IsUnset,

Optional (Some / Option setters). Default: [0u8; 3].

Flags for the hdlr atom (usually all zeros)

Source

pub fn maybe_flags( self, value: Option<[u8; 3]>, ) -> HandlerReferenceAtomBuilder<SetFlags<S>>
where S::Flags: IsUnset,

Optional (Some / Option setters). Default: [0u8; 3].

Flags for the hdlr atom (usually all zeros)

Source

pub fn component_type( self, value: FourCC, ) -> HandlerReferenceAtomBuilder<SetComponentType<S>>
where S::ComponentType: IsUnset,

Optional (Some / Option setters). Default: FourCC([0u8; 4]).

Component type (pre-defined, usually 0)

Source

pub fn maybe_component_type( self, value: Option<FourCC>, ) -> HandlerReferenceAtomBuilder<SetComponentType<S>>
where S::ComponentType: IsUnset,

Optional (Some / Option setters). Default: FourCC([0u8; 4]).

Component type (pre-defined, usually 0)

Source

pub fn handler_type( self, value: HandlerType, ) -> HandlerReferenceAtomBuilder<SetHandlerType<S>>
where S::HandlerType: IsUnset,

Required.

Handler type (4CC code indicating the type of media handler)

Source

pub fn component_manufacturer( self, value: FourCC, ) -> HandlerReferenceAtomBuilder<SetComponentManufacturer<S>>
where S::ComponentManufacturer: IsUnset,

Optional (Some / Option setters). Default: FourCC([0u8; 4]).

Component manufacturer (usually 0)

Source

pub fn maybe_component_manufacturer( self, value: Option<FourCC>, ) -> HandlerReferenceAtomBuilder<SetComponentManufacturer<S>>
where S::ComponentManufacturer: IsUnset,

Optional (Some / Option setters). Default: FourCC([0u8; 4]).

Component manufacturer (usually 0)

Source

pub fn component_flags( self, value: u32, ) -> HandlerReferenceAtomBuilder<SetComponentFlags<S>>
where S::ComponentFlags: IsUnset,

Optional (Some / Option setters). Default: 0.

Component flags (usually 0)

Source

pub fn maybe_component_flags( self, value: Option<u32>, ) -> HandlerReferenceAtomBuilder<SetComponentFlags<S>>
where S::ComponentFlags: IsUnset,

Optional (Some / Option setters). Default: 0.

Component flags (usually 0)

Source

pub fn component_flags_mask( self, value: u32, ) -> HandlerReferenceAtomBuilder<SetComponentFlagsMask<S>>
where S::ComponentFlagsMask: IsUnset,

Optional (Some / Option setters). Default: 0.

Component flags mask (usually 0)

Source

pub fn maybe_component_flags_mask( self, value: Option<u32>, ) -> HandlerReferenceAtomBuilder<SetComponentFlagsMask<S>>
where S::ComponentFlagsMask: IsUnset,

Optional (Some / Option setters). Default: 0.

Component flags mask (usually 0)

Source

pub fn name( self, value: impl Into<HandlerName>, ) -> HandlerReferenceAtomBuilder<SetName<S>>
where S::Name: IsUnset,

Optional (Some / Option setters).

Human-readable name of the handler

Source

pub fn maybe_name( self, value: Option<impl Into<HandlerName>>, ) -> HandlerReferenceAtomBuilder<SetName<S>>
where S::Name: IsUnset,

Optional (Some / Option setters).

Human-readable name of the handler

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.