Struct empris::Player[][src]

pub struct Player<'a> {
    pub name: String,
    // some fields omitted
}
Expand description

A struct used to control an MPRIS player.

Fields

name: String

Implementations

Tries to create a new Player instance from a given name.

Errors

Returns an Err if the provided player is invalid.

Skips to the next track

Errors

Will Err if the Player has closed.

Skips to the previous track

Errors

Will Err if the Player has closed.

Pauses the current track

Errors

Will Err if the Player has closed.

Starts or resumes the current track

Errors

Will Err if the Player has closed.

Resumes/starts or pauses the current track

Errors

Will Err if the Player has closed.

Stops playback

Errors

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.

Errors

May Err if there is a failure in getting the metadata.

Retrieves the value of an MPRIS property. Available properties can be found here.

Errors

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.

Errors

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.

Errors

May return an Err variant if the provided URI is invalid.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.