[][src]Struct cuna::CueSheet

pub struct CueSheet {
    pub header: Header,
    pub files: Vec<TrackInfo>,
    pub comments: Comment,
}

Represents a cue sheet

Fields

header: Headerfiles: Vec<TrackInfo>comments: Comment

Implementations

impl CueSheet[src]

pub const fn new(
    header: Header,
    files: Vec<TrackInfo>,
    comments: Comment
) -> Self
[src]

pub fn from_utf8_with_bom(s: &str) -> Result<Self, Error>[src]

pub fn from_file(file: &mut File) -> Result<Self, Error>[src]

Parses a file as a cue sheet

File must use UTF-8 encoding (BOM header will be removed)

pub fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error>[src]

Opens a file and parses it as a cue sheet

File must use UTF-8 encoding (BOM header will be removed)

pub fn from_buf_read(buf: &mut impl BufRead) -> Result<Self, Error>[src]

pub fn header(&self) -> &Header[src]

pub fn files(&self) -> &Vec<TrackInfo>[src]

pub fn set_files(&mut self, files: Vec<TrackInfo>) -> Vec<TrackInfo>[src]

pub fn comments(&self) -> &Comment[src]

pub fn push_file(&mut self, track: TrackInfo)[src]

pub fn first_file(&self) -> Option<&TrackInfo>[src]

pub fn first_file_mut(&mut self) -> Option<&mut TrackInfo>[src]

pub fn last_file(&self) -> Option<&TrackInfo>[src]

pub fn last_file_mut(&mut self) -> Option<&mut TrackInfo>[src]

pub fn last_track(&self) -> Option<&Track>[src]

pub fn last_track_mut(&mut self) -> Option<&mut Track>[src]

Trait Implementations

impl Clone for CueSheet[src]

impl Debug for CueSheet[src]

impl Default for CueSheet[src]

impl Eq for CueSheet[src]

impl FromStr for CueSheet[src]

type Err = Error

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>[src]

s must be UTF-8 encoding without BOM header

impl Hash for CueSheet[src]

impl PartialEq<CueSheet> for CueSheet[src]

impl StructuralEq for CueSheet[src]

impl StructuralPartialEq for CueSheet[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.