pub enum MonoEvent {
Show 19 variants
Track {
id: u64,
title: String,
artist: String,
album: String,
album_id: u64,
duration_secs: u64,
track_number: Option<u32>,
release_date: Option<String>,
audio_quality: Option<String>,
cover_id: Option<String>,
},
Album {
id: u64,
title: String,
artist: String,
release_date: Option<String>,
track_count: u32,
duration_secs: Option<u64>,
cover_id: Option<String>,
},
AlbumTrack {
position: u32,
id: u64,
title: String,
artist: String,
duration_secs: u64,
audio_quality: Option<String>,
},
Artist {
id: u64,
name: String,
picture_id: Option<String>,
cover_url: Option<String>,
},
SearchTrack {
rank: u32,
id: u64,
title: String,
artist: String,
album: String,
duration_secs: u64,
audio_quality: Option<String>,
},
SearchAlbum {
rank: u32,
id: u64,
title: String,
artist: String,
track_count: u32,
release_date: Option<String>,
},
SearchArtist {
rank: u32,
id: u64,
name: String,
},
LyricLine {
timestamp_ms: Option<u64>,
text: String,
},
Recommendation {
rank: u32,
id: u64,
title: String,
artist: String,
duration_secs: u64,
},
Cover {
url: String,
size: u32,
},
StreamManifest {
id: u64,
url: String,
mime_type: String,
codecs: String,
quality: String,
bit_depth: Option<u32>,
sample_rate: Option<u32>,
extension: String,
},
DownloadProgress {
path: String,
bytes_downloaded: u64,
total_bytes: Option<u64>,
percent: Option<f32>,
},
DownloadComplete {
path: String,
bytes: u64,
mime_type: String,
},
PlaybackStatus {
status: PlayStatus,
elapsed_secs: Option<f32>,
duration_secs: Option<f32>,
},
NowPlaying {
track_id: Option<u64>,
title: Option<String>,
artist: Option<String>,
album: Option<String>,
status: PlayStatus,
position_secs: f32,
duration_secs: f32,
volume: f32,
preamp: f32,
queue_length: usize,
url: Option<String>,
},
Queue {
tracks: Vec<QueuedTrack>,
current_index: Option<usize>,
},
PlaylistInfo {
name: String,
description: String,
track_count: usize,
created_at: String,
updated_at: String,
},
PlayerAck {
action: String,
message: String,
},
Error {
message: String,
},
}Expand description
Events emitted by Monochrome API activation methods
Variants§
Track
Track metadata from /info/?id=
Fields
Album
Album metadata from /album/?id=
Fields
AlbumTrack
Individual track within an album listing (follows Album event)
Fields
Artist
Artist information from /artist/?id=
Fields
SearchTrack
A track from search results (follows SearchStart)
Fields
SearchAlbum
An album from search results
Fields
SearchArtist
An artist from search results
LyricLine
A single lyrics line from /lyrics/?id=
Fields
Recommendation
A recommended track from /recommendations/?id=
Fields
Cover
A cover art URL from /cover/?id=
Fields
StreamManifest
Resolved stream manifest from /track/?id= (use url immediately — it expires)
Fields
DownloadProgress
Streaming download progress
Fields
DownloadComplete
Download finished successfully
Fields
PlaybackStatus
Playback status event from mpv
Fields
status: PlayStatusCurrent player state
NowPlaying
Current playback state — streamed ~1s via now_playing
Fields
status: PlayStatusPlayer state
Queue
Queue contents snapshot
Fields
tracks: Vec<QueuedTrack>Tracks in queue (current + upcoming)
PlaylistInfo
Playlist summary info (from playlist list)
Fields
PlayerAck
Acknowledgement of a player action
Error
Error from any method
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MonoEvent
impl<'de> Deserialize<'de> for MonoEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for MonoEvent
impl JsonSchema for MonoEvent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for MonoEvent
impl RefUnwindSafe for MonoEvent
impl Send for MonoEvent
impl Sync for MonoEvent
impl Unpin for MonoEvent
impl UnsafeUnpin for MonoEvent
impl UnwindSafe for MonoEvent
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.