[][src]Struct aamp::ParameterIO

pub struct ParameterIO {
    pub version: u32,
    pub pio_type: String,
    pub lists: IndexMap<u32, ParameterList>,
    pub objects: IndexMap<u32, ParameterObject>,
}

Represents a single AAMP parameter IO document

Fields

version: u32

The parameter IO version, required by the format but of no functional importance

pio_type: String

The parameter IO type, required by the format but of no functional importance

lists: IndexMap<u32, ParameterList>

The lists in the parameter IO root list (param_root)

objects: IndexMap<u32, ParameterObject>

The objects in the parameter IO root list (param_root)

Implementations

impl ParameterIO[src]

pub fn from_binary<R: Read + Seek>(
    reader: &mut R
) -> Result<ParameterIO, ParseError>
[src]

Parses an AAMP Parameter IO document from its binary format. Takes any reader with the Read and Seek traits and returns a result containing a ParameterIO or a ParseError.

impl ParameterIO[src]

pub fn to_binary(self: ParameterIO) -> Result<Vec<u8>, Box<dyn Error>>[src]

Serializes an AAMP Parameter IO document to its binary format. Returns a result containing a Vec<u8> or a boxed error.

pub fn write_binary<W: Write + Seek>(
    self: ParameterIO,
    writer: &mut W
) -> Result<(), Box<dyn Error>>
[src]

Serializes an AAMP Parameter IO document to its binary format using a write implementing the Write and Seek traits. Returns a result indicating success or a boxed error.

impl ParameterIO[src]

pub fn to_text(self) -> Result<String, Box<dyn Error>>[src]

Returns a YAML representation of an AAMP parameter IO as a string. The output is fully compatible with the representation used in the oead C++ library, and compatible with the representation used in the aamp Python library except where buffer types are used.

pub fn write_text<W: Write>(self, writer: &mut W) -> Result<(), Box<dyn Error>>[src]

Writes a YAML document representing an AAMP parameter IO into a writer. The output is fully compatible with the representation used in the oead C++ library, and compatible with the representation used in the aamp Python library except where buffer types are used.

impl ParameterIO[src]

pub fn from_text(text: &str) -> Result<ParameterIO, Box<dyn Error>>[src]

Parses an AAMP Parameter IO document from a YAML representation. Takes a string slice and returns a result containing a ParameterIO or a boxed error.

impl ParameterIO[src]

pub fn list(&self, name: &str) -> Option<&ParameterList>[src]

Attempt to get a ParameterList by name, returns None if not found

pub fn object(&self, name: &str) -> Option<&ParameterObject>[src]

Attempt to get a ParameterObject by name, returns None if not found

Trait Implementations

impl Clone for ParameterIO[src]

impl Debug for ParameterIO[src]

impl PartialEq<ParameterIO> for ParameterIO[src]

impl StructuralPartialEq for ParameterIO[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.