pub struct DriveProvider { /* private fields */ }Implementations§
Source§impl DriveProvider
impl DriveProvider
pub async fn new( auth: DriveAuth, settings: DriveProviderSettings, repo: Option<RepoDatabaseRead>, token_storage: impl Into<TokenStorage>, ) -> Result<Self, ProviderError>
Trait Implementations§
Source§impl AnniProvider for DriveProvider
impl AnniProvider for DriveProvider
Source§fn albums<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashSet<Cow<'_, str>>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn albums<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashSet<Cow<'_, str>>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get album information provided by provider.
Source§fn get_audio<'life0, 'life1, 'async_trait>(
&'life0 self,
album_id: &'life1 str,
disc_id: NonZeroU8,
track_id: NonZeroU8,
range: Range,
) -> Pin<Box<dyn Future<Output = Result<AudioResourceReader, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_audio<'life0, 'life1, 'async_trait>(
&'life0 self,
album_id: &'life1 str,
disc_id: NonZeroU8,
track_id: NonZeroU8,
range: Range,
) -> Pin<Box<dyn Future<Output = Result<AudioResourceReader, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns a reader implements AsyncRead for content reading
Source§fn get_cover<'life0, 'life1, 'async_trait>(
&'life0 self,
album_id: &'life1 str,
disc_id: Option<NonZeroU8>,
) -> Pin<Box<dyn Future<Output = Result<ResourceReader, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_cover<'life0, 'life1, 'async_trait>(
&'life0 self,
album_id: &'life1 str,
disc_id: Option<NonZeroU8>,
) -> Pin<Box<dyn Future<Output = Result<ResourceReader, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns a cover of corresponding album
Source§fn reload<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reload<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reloads the provider for new albums
Source§fn has_album<'life0, 'life1, 'async_trait>(
&'life0 self,
album_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has_album<'life0, 'life1, 'async_trait>(
&'life0 self,
album_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns whether given album exists
Source§fn get_audio_info<'life0, 'life1, 'async_trait>(
&'life0 self,
album_id: &'life1 str,
disc_id: NonZeroU8,
track_id: NonZeroU8,
) -> Pin<Box<dyn Future<Output = Result<AudioInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_audio_info<'life0, 'life1, 'async_trait>(
&'life0 self,
album_id: &'life1 str,
disc_id: NonZeroU8,
track_id: NonZeroU8,
) -> Pin<Box<dyn Future<Output = Result<AudioInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get audio info describing basic information of the audio file.
Auto Trait Implementations§
impl !Freeze for DriveProvider
impl !RefUnwindSafe for DriveProvider
impl !UnwindSafe for DriveProvider
impl Send for DriveProvider
impl Sync for DriveProvider
impl Unpin for DriveProvider
impl UnsafeUnpin for DriveProvider
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<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