[][src]Struct lrc::Lyrics

pub struct Lyrics {
    pub metadata: BTreeSet<IDTag>,
    // some fields omitted
}

Fields

metadata: BTreeSet<IDTag>

Metadata about this lyrics.

Methods

impl Lyrics[src]

pub fn new() -> Self[src]

Returns the "default value" for a type.

impl Lyrics[src]

pub fn from_str<S: AsRef<str>>(s: S) -> Result<Lyrics, LyricsError>[src]

Create a Lyrics instance with a string.

impl Lyrics[src]

pub fn add_line<S: Into<String>>(&mut self, line: S) -> Result<(), LyricsError>[src]

pub fn add_timed_line<S: Into<String>>(
    &mut self,
    time_tag: TimeTag,
    line: S
) -> Result<(), LyricsError>
[src]

pub fn add_line_with_multiple_time_tags<S: Into<String>>(
    &mut self,
    time_tags: &[TimeTag],
    line: S
) -> Result<(), LyricsError>
[src]

impl Lyrics[src]

pub fn get_lines(&self) -> &[String][src]

pub fn get_timed_lines(&self) -> &[(TimeTag, Rc<str>)][src]

pub fn remove_line(&mut self, index: usize) -> String[src]

pub fn remove_timed_line(&mut self, index: usize) -> (TimeTag, Rc<str>)[src]

pub fn find_timed_line_index<N: Into<i64>>(&self, timestamp: N) -> Option<usize>[src]

Trait Implementations

impl Clone for Lyrics[src]

impl Debug for Lyrics[src]

impl Default for Lyrics[src]

impl Display for Lyrics[src]

impl FromStr for Lyrics[src]

type Err = LyricsError

The associated error which can be returned from parsing.

Auto Trait Implementations

impl !RefUnwindSafe for Lyrics

impl !Send for Lyrics

impl !Sync for Lyrics

impl Unpin for Lyrics

impl UnwindSafe for Lyrics

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> ToString for T where
    T: Display + ?Sized
[src]

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.