pub struct MonoHub { /* private fields */ }Expand description
Monochrome music API activation — stateless API proxy.
Implementations§
Source§impl MonoHub
impl MonoHub
Source§impl MonoHub
impl MonoHub
Sourcepub async fn track(
&self,
id: u64,
) -> impl Stream<Item = MonoEvent> + Send + 'static
pub async fn track( &self, id: u64, ) -> impl Stream<Item = MonoEvent> + Send + 'static
Get track metadata by Tidal track ID
Sourcepub async fn album(
&self,
id: u64,
) -> impl Stream<Item = MonoEvent> + Send + 'static
pub async fn album( &self, id: u64, ) -> impl Stream<Item = MonoEvent> + Send + 'static
Get album metadata and its full track listing by Tidal album ID
Sourcepub async fn artist(
&self,
id: u64,
) -> impl Stream<Item = MonoEvent> + Send + 'static
pub async fn artist( &self, id: u64, ) -> impl Stream<Item = MonoEvent> + Send + 'static
Get artist metadata by Tidal artist ID
Sourcepub async fn search(
&self,
query: String,
kind: Option<SearchKind>,
limit: Option<u32>,
offset: Option<u32>,
) -> impl Stream<Item = MonoEvent> + Send + 'static
pub async fn search( &self, query: String, kind: Option<SearchKind>, limit: Option<u32>, offset: Option<u32>, ) -> impl Stream<Item = MonoEvent> + Send + 'static
Search for tracks, albums, or artists
Sourcepub async fn lyrics(
&self,
id: u64,
) -> impl Stream<Item = MonoEvent> + Send + 'static
pub async fn lyrics( &self, id: u64, ) -> impl Stream<Item = MonoEvent> + Send + 'static
Get synchronized lyrics for a track by Tidal track ID
Sourcepub async fn recommendations(
&self,
id: u64,
) -> impl Stream<Item = MonoEvent> + Send + 'static
pub async fn recommendations( &self, id: u64, ) -> impl Stream<Item = MonoEvent> + Send + 'static
Get recommended tracks similar to a given track
Sourcepub async fn stream_url(
&self,
id: u64,
quality: Option<String>,
) -> impl Stream<Item = MonoEvent> + Send + 'static
pub async fn stream_url( &self, id: u64, quality: Option<String>, ) -> impl Stream<Item = MonoEvent> + Send + 'static
Resolve the direct CDN stream URL for a track
Trait Implementations§
Source§impl Activation for MonoHub
impl Activation for MonoHub
type Methods = MonoHubMethod
fn namespace(&self) -> &str
fn version(&self) -> &str
Source§fn description(&self) -> &str
fn description(&self) -> &str
Short description (max 15 words)
Source§fn long_description(&self) -> Option<&str>
fn long_description(&self) -> Option<&str>
Long description (optional, for detailed documentation)
fn methods(&self) -> Vec<&str>
fn method_help(&self, method: &str) -> Option<String>
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn into_rpc_methods(self) -> Methods
Source§fn plugin_schema(&self) -> PluginSchema
fn plugin_schema(&self) -> PluginSchema
Return this activation’s schema (methods + optional children)
Source§fn plugin_id(&self) -> Uuid
fn plugin_id(&self) -> Uuid
Stable activation instance ID for handle routing
By default generates a deterministic UUID from namespace+major_version
Using major version only ensures handles survive minor/patch upgrades (semver)
fn resolve_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
_handle: &'life1 Handle,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Source§impl MonoHubRpcServer for MonoHub
impl MonoHubRpcServer for MonoHub
Source§fn track<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn track<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get track metadata by Tidal track ID
Source§fn album<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn album<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get album metadata and its full track listing by Tidal album ID
Source§fn artist<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn artist<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get artist metadata by Tidal artist ID
Source§fn search<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
query: String,
kind: Option<SearchKind>,
limit: Option<u32>,
offset: Option<u32>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
query: String,
kind: Option<SearchKind>,
limit: Option<u32>,
offset: Option<u32>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Search for tracks, albums, or artists
Source§fn lyrics<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn lyrics<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get synchronized lyrics for a track by Tidal track ID
Source§fn recommendations<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recommendations<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get recommended tracks similar to a given track
Source§fn stream_url<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
quality: Option<String>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_url<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
quality: Option<String>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Resolve the direct CDN stream URL for a track
Source§fn download<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
path: String,
quality: Option<String>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn download<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
id: u64,
path: String,
quality: Option<String>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Download a track to a local file
Auto Trait Implementations§
impl Freeze for MonoHub
impl !RefUnwindSafe for MonoHub
impl Send for MonoHub
impl Sync for MonoHub
impl Unpin for MonoHub
impl UnsafeUnpin for MonoHub
impl !UnwindSafe for MonoHub
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> 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,
Pipes by value. This is generally the method you want to use. Read more
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,
Borrows
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,
Mutably borrows
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
Borrows
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
Mutably borrows
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
Borrows
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
Immutable access to the
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
Mutable access to the
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
Immutable access to the
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
Mutable access to the
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
Immutable access to the
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
Mutable access to the
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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.tap_deref() only in debug builds, and is erased in release
builds.