[−][src]Struct mpls::types::Angle
Represents a playlist's angle.
"Angles", as they are called, are just a variation of a playlist where one or more segments are swapped out for different ones. The overall number of segments, however, is always the same for all angles.
You can use the segments
method to retrieve the playlist segments
associated with this angle.
Fields
index: u8
The angle index in this playlist.
Implementations
impl<'_> Angle<'_>
[src]
pub fn segments(&self) -> Vec<&Clip>
[src]
Gets all segments for this angle.
Examples
Get all clip file names (without their extension) for an angle:
use mpls::Mpls; let segments: Vec<&str> = angle .segments() .iter() .map(|s| s.file_name.as_ref()) .collect(); assert_eq!(segments, &["00055", "00059", "00061"])
Multi-angle:
use mpls::Mpls; // let mpls = Mpls::from(...)?; let angles = mpls.angles(); let segments: (Vec<&str>, Vec<&str>) = ( angles[0].segments().iter().map(|s| s.file_name.as_ref()).collect(), angles[1].segments().iter().map(|s| s.file_name.as_ref()).collect()); assert_eq!(&segments.0[..5], &["00081", "00082", "00086", "00087", "00091"]); assert_eq!(&segments.1[..5], &["00081", "00083", "00086", "00088", "00091"]);
Trait Implementations
impl<'mpls> Clone for Angle<'mpls>
[src]
impl<'mpls> Copy for Angle<'mpls>
[src]
impl<'mpls> Debug for Angle<'mpls>
[src]
impl<'a, '_> Display for Angle<'_>
[src]
Auto Trait Implementations
impl<'mpls> RefUnwindSafe for Angle<'mpls>
impl<'mpls> Send for Angle<'mpls>
impl<'mpls> Sync for Angle<'mpls>
impl<'mpls> Unpin for Angle<'mpls>
impl<'mpls> UnwindSafe for Angle<'mpls>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,