pub struct NowPlayingPerl { /* private fields */ }Implementations§
Source§impl NowPlayingPerl
impl NowPlayingPerl
pub fn new() -> Self
pub fn get_info(&self) -> RwLockReadGuard<'_, Option<NowPlayingInfo>>
Trait Implementations§
Source§impl Controller for NowPlayingPerl
impl Controller for NowPlayingPerl
fn is_info_some(&self) -> bool
Source§impl Drop for NowPlayingPerl
impl Drop for NowPlayingPerl
Source§impl Subscription for NowPlayingPerl
impl Subscription for NowPlayingPerl
fn get_info(&self) -> RwLockReadGuard<'_, Option<NowPlayingInfo>>
fn get_token_counter(&self) -> Arc<AtomicU64>
fn get_listeners( &self, ) -> Arc<Mutex<HashMap<ListenerToken, Box<dyn Fn(RwLockReadGuard<'_, Option<NowPlayingInfo>>) + Send + Sync>>>>
Source§fn subscribe<F: Fn(RwLockReadGuard<'_, Option<NowPlayingInfo>>) + Send + Sync + 'static>(
&self,
listener: F,
) -> ListenerToken
fn subscribe<F: Fn(RwLockReadGuard<'_, Option<NowPlayingInfo>>) + Send + Sync + 'static>( &self, listener: F, ) -> ListenerToken
Subscribes a listener to receive updates when the “Now Playing” information changes. Read more
Source§fn unsubscribe(&self, token: ListenerToken)
fn unsubscribe(&self, token: ListenerToken)
Unsubscribes a previously registered listener using the provided
ListenerToken. Read moreAuto Trait Implementations§
impl Freeze for NowPlayingPerl
impl RefUnwindSafe for NowPlayingPerl
impl Send for NowPlayingPerl
impl Sync for NowPlayingPerl
impl Unpin for NowPlayingPerl
impl UnwindSafe for NowPlayingPerl
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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