pub struct StreamResolver { /* private fields */ }Expand description
Resolves tracks to streams through the Authenticator.
Implementations§
Source§impl StreamResolver
impl StreamResolver
Sourcepub fn new(auth: Arc<Authenticator>) -> Self
pub fn new(auth: Arc<Authenticator>) -> Self
A resolver whose requests time out after RESOLVE_TIMEOUT.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Replaces the request timeout.
Sourcepub async fn resolve_stream(
&self,
track_id: u64,
max_quality: AudioQuality,
) -> Result<ResolvedStream, StreamError>
pub async fn resolve_stream( &self, track_id: u64, max_quality: AudioQuality, ) -> Result<ResolvedStream, StreamError>
Resolves track_id, asking for max_quality (AC1, AC5).
Sends exactly one playbackinfopostpaywall request, whatever the
outcome (no client-side quality ladder): Tidal downgrades by itself,
and ResolvedStream::quality says what it granted. Errors map as
in spec 0003 “Quality”; anything not listed there comes back as
StreamError::Auth, unchanged.
Trait Implementations§
Source§impl Clone for StreamResolver
impl Clone for StreamResolver
Auto Trait Implementations§
impl !RefUnwindSafe for StreamResolver
impl !UnwindSafe for StreamResolver
impl Freeze for StreamResolver
impl Send for StreamResolver
impl Sync for StreamResolver
impl Unpin for StreamResolver
impl UnsafeUnpin for StreamResolver
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