Item

Struct Item 

Source
pub struct Item {
Show 66 fields 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,
}
Expand description

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

Fields§

§id: u32§path: PathBuf

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

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

Implementations§

Source§

impl Item

Source

pub fn from_row(db_row__: &Row<'_, '_>) -> Self

Bind the metadata for a single entry.

Source§

impl Item

Source

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

Bind each of the entries in the items table.

Trait Implementations§

Source§

impl Debug for Item

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Item

§

impl RefUnwindSafe for Item

§

impl Send for Item

§

impl Sync for Item

§

impl Unpin for Item

§

impl UnwindSafe for Item

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.