[][src]Struct mpls::types::Mpls

pub struct Mpls {
    pub app_info_play_list: AppInfoPlayList,
    pub play_list: PlayList,
    pub marks: Vec<PlayListMark>,
    pub ext: Vec<ExtensionDataEntry>,
}

The movie playlist.

See the crate-level docs for high-level documentation about how to use this type.

Fields

app_info_play_list: AppInfoPlayListplay_list: PlayListmarks: Vec<PlayListMark>ext: Vec<ExtensionDataEntry>

Implementations

impl Mpls[src]

pub fn from<R: Read>(reader: R) -> Result<Mpls, MplsError>[src]

Attempts to parse a movie playlist from the given reader.

Examples

use std::fs::File;
use std::io::Read;
use mpls::Mpls;

let mut file = File::open("00800.mpls")?;
let mpls = Mpls::from(&file).expect("failed to parse MPLS file.");

pub fn angles(&self) -> Vec<Angle>[src]

Gets all of the movie's angles.

This method will always return at least one element, since it counts the main feature as an angle regardless of whether the movie contains any additional angles.

Examples

A playlist with four angles in total (one of them being the main feature):

use mpls::Mpls;

// let mpls = Mpls::from(...)?;
let angles = mpls.angles();
assert_eq!(angles.len(), 4);

A playlist that has no additional angles, only the main feature:

use mpls::Mpls;

// let mpls = Mpls::from(...)?;
assert_eq!(angles.len(), 1);

Trait Implementations

impl Clone for Mpls[src]

impl Debug for Mpls[src]

Auto Trait Implementations

impl RefUnwindSafe for Mpls

impl Send for Mpls

impl Sync for Mpls

impl Unpin for Mpls

impl UnwindSafe for Mpls

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.