[][src]Struct beet_db::Item

pub struct Item {
    pub id: u32,
    pub path: PathBuf,
    pub album_id: Option<u32>,
    pub title: String,
    pub artist: String,
    pub artist_sort: String,
    pub artist_credit: String,
    pub album: String,
    pub albumartist: String,
    pub albumartist_sort: String,
    pub albumartist_credit: String,
    pub genre: String,
    pub lyricist: String,
    pub composer: String,
    pub composer_sort: String,
    pub arranger: String,
    pub grouping: String,
    pub year: u16,
    pub month: u32,
    pub day: u32,
    pub track: u32,
    pub tracktotal: u32,
    pub disc: u32,
    pub disctotal: u32,
    pub lyrics: String,
    pub comments: String,
    pub bpm: u32,
    pub comp: bool,
    pub mb_trackid: String,
    pub mb_albumid: String,
    pub mb_artistid: String,
    pub mb_albumartistid: String,
    pub mb_releasetrackid: String,
    pub albumtype: String,
    pub label: String,
    pub acoustid_fingerprint: String,
    pub acoustid_id: String,
    pub mb_releasegroupid: String,
    pub asin: String,
    pub catalognum: String,
    pub script: String,
    pub language: String,
    pub country: String,
    pub albumstatus: String,
    pub media: String,
    pub albumdisambig: String,
    pub disctitle: String,
    pub encoder: String,
    pub rg_track_gain: Option<f64>,
    pub rg_track_peak: Option<f64>,
    pub rg_album_gain: Option<f64>,
    pub rg_album_peak: Option<f64>,
    pub r128_track_gain: u32,
    pub r128_album_gain: u32,
    pub original_year: u16,
    pub original_month: u8,
    pub original_day: u8,
    pub initial_key: Option<String>,
    pub length: f64,
    pub bitrate: u32,
    pub format: String,
    pub samplerate: u32,
    pub bitdepth: u16,
    pub channels: u8,
    pub mtime: f64,
    pub added: f64,
}

All of the fields that an "item" (track) has in the beets schema.

Fields

id: u32path: PathBuf

This is converted lossily - any invalid UTF-8 will be transcribed as the replacement character.

album_id: Option<u32>title: Stringartist: Stringartist_sort: Stringartist_credit: Stringalbum: Stringalbumartist: Stringalbumartist_sort: Stringalbumartist_credit: Stringgenre: Stringlyricist: Stringcomposer: Stringcomposer_sort: Stringarranger: Stringgrouping: Stringyear: u16month: u32day: u32track: u32tracktotal: u32disc: u32disctotal: u32lyrics: Stringcomments: Stringbpm: u32comp: boolmb_trackid: Stringmb_albumid: Stringmb_artistid: Stringmb_albumartistid: Stringmb_releasetrackid: Stringalbumtype: Stringlabel: Stringacoustid_fingerprint: Stringacoustid_id: Stringmb_releasegroupid: Stringasin: Stringcatalognum: Stringscript: Stringlanguage: Stringcountry: Stringalbumstatus: Stringmedia: Stringalbumdisambig: Stringdisctitle: Stringencoder: Stringrg_track_gain: Option<f64>rg_track_peak: Option<f64>rg_album_gain: Option<f64>rg_album_peak: Option<f64>r128_track_gain: u32r128_album_gain: u32original_year: u16original_month: u8original_day: u8initial_key: Option<String>length: f64bitrate: u32format: Stringsamplerate: u32bitdepth: u16channels: u8mtime: f64added: f64

Methods

impl Item[src]

pub fn from_row(db_row__: &Row) -> Self[src]

Bind the metadata for a single entry.

impl Item[src]

pub fn read_all(c: &Connection) -> Result<Vec<Self>, Error>[src]

Bind each of the entries in the items table.

Trait Implementations

impl Debug for Item[src]

Auto Trait Implementations

impl Send for Item

impl Sync for Item

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]