Struct mpris_server::builder::MetadataBuilder
source · pub struct MetadataBuilder { /* private fields */ }
Expand description
A builder used to create Metadata
.
Implementations§
source§impl MetadataBuilder
impl MetadataBuilder
sourcepub fn other(self, key: &str, value: impl Into<Value<'static>>) -> Self
pub fn other(self, key: &str, value: impl Into<Value<'static>>) -> Self
Sets a value for the given key.
sourcepub fn trackid(self, trackid: impl Into<TrackId>) -> Self
pub fn trackid(self, trackid: impl Into<TrackId>) -> Self
Sets a unique identity for this track within the context of an MPRIS object (eg: tracklist).
This contains a D-Bus path that uniquely identifies the track within the scope of the playlist. There may or may not be an actual D-Bus object at that path; this specification says nothing about what interfaces such an object may implement.
sourcepub fn art_url(self, art_url: impl Into<Uri>) -> Self
pub fn art_url(self, art_url: impl Into<Uri>) -> Self
Sets 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 album_artist(
self,
album_artist: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn album_artist( self, album_artist: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets the album artist(s).
sourcepub fn artist(self, artist: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn artist(self, artist: impl IntoIterator<Item = impl Into<String>>) -> Self
Sets the track artist(s).
sourcepub fn audio_bpm(self, audio_bpm: i32) -> Self
pub fn audio_bpm(self, audio_bpm: i32) -> Self
Sets the speed of the music, in beats per minute.
sourcepub fn auto_rating(self, auto_rating: f64) -> Self
pub fn auto_rating(self, auto_rating: f64) -> Self
Sets 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 comment(
self,
comment: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn comment( self, comment: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets a (list of) freeform comment(s).
sourcepub fn composer(
self,
composer: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn composer( self, composer: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets the composer(s) of the track.
sourcepub fn content_created(self, content_created: impl Into<DateTime>) -> Self
pub fn content_created(self, content_created: impl Into<DateTime>) -> Self
Sets when the track was created. Usually only the year component will be useful.
sourcepub fn disc_number(self, disc_number: i32) -> Self
pub fn disc_number(self, disc_number: i32) -> Self
Sets the disc number on the album that this track is from.
sourcepub fn first_used(self, first_used: impl Into<DateTime>) -> Self
pub fn first_used(self, first_used: impl Into<DateTime>) -> Self
Sets when the track was first played.
sourcepub fn genre(self, genre: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn genre(self, genre: impl IntoIterator<Item = impl Into<String>>) -> Self
Sets the genre(s) of the track.
sourcepub fn last_used(self, last_used: impl Into<DateTime>) -> Self
pub fn last_used(self, last_used: impl Into<DateTime>) -> Self
Sets when the track was last played.
sourcepub fn lyricist(
self,
lyricist: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn lyricist( self, lyricist: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets the lyricist(s) of the track.
sourcepub fn track_number(self, track_number: i32) -> Self
pub fn track_number(self, track_number: i32) -> Self
Sets the track number on the album disc.
sourcepub fn use_count(self, use_count: i32) -> Self
pub fn use_count(self, use_count: i32) -> Self
Sets the number of times the track has been played.
sourcepub fn user_rating(self, user_rating: f64) -> Self
pub fn user_rating(self, user_rating: f64) -> Self
Sets a user-specified rating. This should be in the range 0.0 to 1.0.
Trait Implementations§
source§impl Clone for MetadataBuilder
impl Clone for MetadataBuilder
source§fn clone(&self) -> MetadataBuilder
fn clone(&self) -> MetadataBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MetadataBuilder
impl Debug for MetadataBuilder
source§impl Default for MetadataBuilder
impl Default for MetadataBuilder
source§fn default() -> MetadataBuilder
fn default() -> MetadataBuilder
Auto Trait Implementations§
impl Freeze for MetadataBuilder
impl RefUnwindSafe for MetadataBuilder
impl Send for MetadataBuilder
impl Sync for MetadataBuilder
impl Unpin for MetadataBuilder
impl UnwindSafe for MetadataBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)