pub struct Player<'a> {
pub name: String,
// some fields omitted
}
Expand description
A struct used to control an MPRIS player.
Tries to create a new Player
instance from a given name.
Returns an Err
if the provided player is invalid.
Skips to the next track
Will Err
if the Player
has closed.
Skips to the previous track
Will Err
if the Player
has closed.
Pauses the current track
Will Err
if the Player
has closed.
Starts or resumes the current track
Will Err
if the Player
has closed.
Resumes/starts or pauses the current track
Will Err
if the Player
has closed.
Stops playback
Will Err
if the Player
has closed.
Retrieves track metadata from the Player
.
The prop_cast
function may be used
to get specific values out of the resulting metadata.
May Err
if there is a failure in getting the metadata.
Retrieves the value of an MPRIS property.
Available properties can be found here.
May return an Err
variant if:
- An invalid type was provided for the property
- An invalid property was provided
Sets the value of a writable MPRIS property.
Available properties can be found here.
May return an Err
variant if:
- An invalid type was provided for the property
- An invalid property was provided
Seeks the position of the active track.
Same as seek
, but in reverse.
Sets the position of the current track, by microseconds.
Opens a track by its URI.
May return an Err
variant if the provided URI is invalid.
Performs copy-assignment from source
. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.