Struct mpris_server::Metadata
source · pub struct Metadata(/* private fields */);Implementations§
source§impl Metadata
impl Metadata
pub fn new() -> Self
pub fn builder() -> MetadataBuilder
pub fn insert( &mut self, key: impl Into<String>, value: impl Into<Value<'static>> ) -> Option<Value<'static>>
pub fn get<'v, V>(&'v self, key: &str) -> Option<Result<&'v V>>where &'v V: TryFrom<&'v Value<'v>>,
pub fn get_value(&self, key: &str) -> Option<&Value<'_>>
sourcepub fn set_trackid(&mut self, trackid: OwnedObjectPath)
pub fn set_trackid(&mut self, trackid: OwnedObjectPath)
A unique identity for this track within the context of an MPRIS object (eg: tracklist).
sourcepub fn set_length(&mut self, length: TimeInUs)
pub fn set_length(&mut self, length: TimeInUs)
The duration of the track in microseconds.
sourcepub fn set_art_url(&mut self, art_url: Uri)
pub fn set_art_url(&mut self, art_url: Uri)
The location of an image representing the track or album. Clients should not assume this will continue to exist when the media player stops giving out the URL.
sourcepub fn set_album_artist(&mut self, album_artist: Vec<String>)
pub fn set_album_artist(&mut self, album_artist: Vec<String>)
The album artist(s).
sourcepub fn set_artist(&mut self, artist: Vec<String>)
pub fn set_artist(&mut self, artist: Vec<String>)
The track artist(s).
sourcepub fn set_lyrics(&mut self, lyrics: String)
pub fn set_lyrics(&mut self, lyrics: String)
The track lyrics.
sourcepub fn set_audio_bpm(&mut self, audio_bpm: i32)
pub fn set_audio_bpm(&mut self, audio_bpm: i32)
The speed of the music, in beats per minute.
sourcepub fn set_auto_rating(&mut self, auto_rating: f64)
pub fn set_auto_rating(&mut self, auto_rating: f64)
An automatically-generated rating, based on things such as how often it has been played. This should be in the range 0.0 to 1.0.
sourcepub fn set_comment(&mut self, comment: Vec<String>)
pub fn set_comment(&mut self, comment: Vec<String>)
A (list of) freeform comment(s).
sourcepub fn set_composer(&mut self, composer: Vec<String>)
pub fn set_composer(&mut self, composer: Vec<String>)
The composer(s) of the track.
sourcepub fn set_content_created(&mut self, content_created: DateTime)
pub fn set_content_created(&mut self, content_created: DateTime)
When the track was created. Usually only the year component will be useful.
sourcepub fn set_disc_number(&mut self, disc_number: i32)
pub fn set_disc_number(&mut self, disc_number: i32)
The disc number on the album that this track is from.
sourcepub fn set_first_used(&mut self, first_used: DateTime)
pub fn set_first_used(&mut self, first_used: DateTime)
When the track was first played.
sourcepub fn set_last_used(&mut self, last_used: DateTime)
pub fn set_last_used(&mut self, last_used: DateTime)
When the track was last played.
sourcepub fn set_lyricist(&mut self, lyricist: Vec<String>)
pub fn set_lyricist(&mut self, lyricist: Vec<String>)
The lyricist(s) of the track.
sourcepub fn set_track_number(&mut self, track_number: i32)
pub fn set_track_number(&mut self, track_number: i32)
The track number on the album disc.
sourcepub fn set_use_count(&mut self, use_count: i32)
pub fn set_use_count(&mut self, use_count: i32)
The number of times the track has been played.
sourcepub fn set_user_rating(&mut self, user_rating: f64)
pub fn set_user_rating(&mut self, user_rating: f64)
A user-specified rating. This should be in the range 0.0 to 1.0.