pub struct TypedPriorityProvider<P>(/* private fields */);Implementations§
Source§impl<P> TypedPriorityProvider<P>
impl<P> TypedPriorityProvider<P>
pub fn new(providers: Vec<(i32, P)>) -> Self
pub fn insert(&mut self, provider: P, priority: i32)
pub fn iter(&self) -> impl Iterator<Item = &(i32, P)> + '_
pub fn providers(&self) -> impl Iterator<Item = &P> + '_
pub fn providers_mut(&mut self) -> impl Iterator<Item = &mut P> + '_
Source§impl<P: AnniProvider + Send + Sync + 'static> TypedPriorityProvider<P>
impl<P: AnniProvider + Send + Sync + 'static> TypedPriorityProvider<P>
pub fn into_boxed(self) -> PriorityProvider
Trait Implementations§
Source§impl<P: AnniProvider + Send + Sync> AnniProvider for TypedPriorityProvider<P>
impl<P: AnniProvider + Send + Sync> AnniProvider for TypedPriorityProvider<P>
Source§fn reload<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reload<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Attempts to reload all providers.
If multiple providers errors, the last error will be returned.
Source§fn albums<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashSet<Cow<'_, str>>>> + 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>>>> + 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>> + 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>> + 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>> + 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>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns a cover of corresponding album
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.
Source§impl<P: Default> Default for TypedPriorityProvider<P>
impl<P: Default> Default for TypedPriorityProvider<P>
Source§fn default() -> TypedPriorityProvider<P>
fn default() -> TypedPriorityProvider<P>
Returns the “default value” for a type. Read more
Source§impl<P> FromIterator<(i32, P)> for TypedPriorityProvider<P>
impl<P> FromIterator<(i32, P)> for TypedPriorityProvider<P>
Auto Trait Implementations§
impl<P> Freeze for TypedPriorityProvider<P>
impl<P> RefUnwindSafe for TypedPriorityProvider<P>where
P: RefUnwindSafe,
impl<P> Send for TypedPriorityProvider<P>where
P: Send,
impl<P> Sync for TypedPriorityProvider<P>where
P: Sync,
impl<P> Unpin for TypedPriorityProvider<P>where
P: Unpin,
impl<P> UnsafeUnpin for TypedPriorityProvider<P>
impl<P> UnwindSafe for TypedPriorityProvider<P>where
P: UnwindSafe,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().