pub struct TracklistEntry {
pub line: usize,
pub kind: EntryKind,
pub eol: Eol,
pub raw: String,
pub parts: Parts,
pub time: Option<TimeValue>,
pub track: Option<ParsedTrack>,
pub layered: bool,
}Expand description
One line of a tracklist.
use trackparse::tracklist::{parse_tracklist, EntryKind, Eol};
let list = parse_tracklist("00:00 Noisia - Stigma\nw/ Phace - Cold Champagne\n");
let entry = &list.entries[1];
assert_eq!(entry.line, 2);
assert_eq!(entry.kind, EntryKind::Track);
assert_eq!(entry.eol, Eol::Lf);
assert_eq!(entry.raw, "w/ Phace - Cold Champagne");
assert!(entry.time.is_none());
assert!(entry.layered);
assert_eq!(entry.track.as_ref().unwrap().title, "Cold Champagne");Fields§
§line: usize1-based line number.
kind: EntryKindWhat the line is.
eol: EolThe line terminator that followed it.
raw: StringThe line as written, without its terminator. Never normalized.
parts: Partsraw cut into lead, time, gap and rest.
time: Option<TimeValue>The line’s time, if it has a valid one.
track: Option<ParsedTrack>The parse of the line text, for Track and Marker entries.
layered: boolThe line starts with w/: played over the previous track (R13.13).
Implementations§
Trait Implementations§
Source§impl Clone for TracklistEntry
impl Clone for TracklistEntry
Source§impl Debug for TracklistEntry
impl Debug for TracklistEntry
Source§impl<'de> Deserialize<'de> for TracklistEntry
Available on crate feature serde only.
impl<'de> Deserialize<'de> for TracklistEntry
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TracklistEntry
impl PartialEq for TracklistEntry
Source§impl Serialize for TracklistEntry
Available on crate feature serde only.
impl Serialize for TracklistEntry
Available on crate feature
serde only.impl StructuralPartialEq for TracklistEntry
Auto Trait Implementations§
impl Forget for TracklistEntry
impl Freeze for TracklistEntry
impl Move for TracklistEntry
impl RefUnwindSafe for TracklistEntry
impl Send for TracklistEntry
impl Sync for TracklistEntry
impl Unpin for TracklistEntry
impl UnsafeUnpin for TracklistEntry
impl UnwindSafe for TracklistEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more