pub struct MprisConfig {
pub bus_name: String,
pub identity: String,
pub desktop_entry: String,
pub supported_uri_schemes: Vec<String>,
pub supported_mime_types: Vec<String>,
}Expand description
Identity for the served MPRIS bus: the well-known name + human-readable player name, so different consumers (Music, Tube, the local video player) present distinctly in the system media widget.
Fields§
§bus_name: StringFull well-known bus name, org.mpris.MediaPlayer2.<app_id>.
identity: StringHuman-readable player name shown by the desktop (Identity).
desktop_entry: StringDesktopEntry — the .desktop basename, for the desktop to find the app.
supported_uri_schemes: Vec<String>URI schemes this player accepts (SupportedUriSchemes).
supported_mime_types: Vec<String>Media formats this player accepts (SupportedMimeTypes).
Implementations§
Source§impl MprisConfig
impl MprisConfig
Sourcepub fn new(app_id: &str, identity: &str) -> Self
pub fn new(app_id: &str, identity: &str) -> Self
The player of this process, shown as identity. Its bus name is the
launched package’s (org.mpris.MediaPlayer2.<package id>, the one
name a sandboxed package may own), else app_id’s for an app run
outside a launcher; app_id is also the DesktopEntry.
Sourcepub fn for_process(
process: &ProcessIdentity,
app_id: &str,
identity: &str,
) -> Self
pub fn for_process( process: &ProcessIdentity, app_id: &str, identity: &str, ) -> Self
Self::new for the process process describes.
Trait Implementations§
Source§impl Clone for MprisConfig
impl Clone for MprisConfig
Auto Trait Implementations§
impl Forget for MprisConfig
impl Freeze for MprisConfig
impl Move for MprisConfig
impl RefUnwindSafe for MprisConfig
impl Send for MprisConfig
impl Sync for MprisConfig
impl Unpin for MprisConfig
impl UnsafeUnpin for MprisConfig
impl UnwindSafe for MprisConfig
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more