Struct mpris::PlayerFinder [−][src]
pub struct PlayerFinder { /* fields omitted */ }
Used to find Player
s running on a D-Bus connection.
Methods
impl PlayerFinder
[src]
impl PlayerFinder
pub fn new() -> Result<Self, DBusError>
[src]
pub fn new() -> Result<Self, DBusError>
Creates a new PlayerFinder
with a new default D-Bus connection.
Use for_connection
if you want to provide the D-Bus connection yourself.
pub fn for_connection(connection: Connection) -> Self
[src]
pub fn for_connection(connection: Connection) -> Self
Create a new PlayerFinder
with the given connection.
Use new
if you want a new default connection rather than manually managing the D-Bus
connection.
pub fn find_all<'a>(&self) -> Result<Vec<Player<'a>>, FindingError>
[src]
pub fn find_all<'a>(&self) -> Result<Vec<Player<'a>>, FindingError>
Find all available Player
s in the connection.
pub fn find_active<'a>(&self) -> Result<Player<'a>, FindingError>
[src]
pub fn find_active<'a>(&self) -> Result<Player<'a>, FindingError>
Try to find the "active" player in the connection.
MPRIS does not have the concept of "active" and all players are treated the same, even if only one of the players are currently playing something.
This method will try to determine which player a user is most likely to use.
NOTE: Currently this method is very naive and just returns the first player. This behavior can change later without a major version change, so don't rely on that behavior.
Trait Implementations
impl Debug for PlayerFinder
[src]
impl Debug for PlayerFinder
Auto Trait Implementations
impl !Send for PlayerFinder
impl !Send for PlayerFinder
impl !Sync for PlayerFinder
impl !Sync for PlayerFinder