pub struct NowPlaying {
pub user: String,
pub minutes_ago: usize,
pub player_id: usize,
/* private fields */
}
Expand description
Information about currently playing media.
Due to the “now playing” information possibly containing both audio and
video, compromises are made. NowPlaying
only stores the ID, title, and
content type of the media. This is most of the information afforded through
the web interface. For more detailed information, song_info()
or
video_info()
gives the full Song
or Video
struct, though requires
another web request.
Fields§
§user: String
The user streaming the current media.
minutes_ago: usize
How long ago the user sent an update to the server.
player_id: usize
The ID of the player.
Implementations§
Trait Implementations§
Source§impl Debug for NowPlaying
impl Debug for NowPlaying
Source§impl<'de> Deserialize<'de> for NowPlaying
impl<'de> Deserialize<'de> for NowPlaying
Source§fn deserialize<D>(de: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(de: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NowPlaying
impl RefUnwindSafe for NowPlaying
impl Send for NowPlaying
impl Sync for NowPlaying
impl Unpin for NowPlaying
impl UnwindSafe for NowPlaying
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