pub enum CacheItemType {
Albums(Arc<Vec<LibraryAlbum>>),
AlbumTracks(Arc<Vec<LibraryTrack>>),
ArtistAlbums(Arc<Vec<LibraryAlbum>>),
Artist(Arc<LibraryArtist>),
Album(Arc<LibraryAlbum>),
}Variants§
Albums(Arc<Vec<LibraryAlbum>>)
AlbumTracks(Arc<Vec<LibraryTrack>>)
ArtistAlbums(Arc<Vec<LibraryAlbum>>)
Artist(Arc<LibraryArtist>)
Album(Arc<LibraryAlbum>)
Implementations§
Source§impl CacheItemType
impl CacheItemType
Sourcepub fn is_albums(&self) -> bool
pub fn is_albums(&self) -> bool
Returns true if this is a CacheItemType::Albums, otherwise false
Sourcepub fn as_albums_mut(&mut self) -> Option<&mut Arc<Vec<LibraryAlbum>>>
pub fn as_albums_mut(&mut self) -> Option<&mut Arc<Vec<LibraryAlbum>>>
Optionally returns mutable references to the inner fields if this is a CacheItemType::Albums, otherwise None
Sourcepub fn as_albums(&self) -> Option<&Arc<Vec<LibraryAlbum>>>
pub fn as_albums(&self) -> Option<&Arc<Vec<LibraryAlbum>>>
Optionally returns references to the inner fields if this is a CacheItemType::Albums, otherwise None
Sourcepub fn into_albums(self) -> Result<Arc<Vec<LibraryAlbum>>, Self>
pub fn into_albums(self) -> Result<Arc<Vec<LibraryAlbum>>, Self>
Returns the inner fields if this is a CacheItemType::Albums, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_album_tracks(&self) -> bool
pub fn is_album_tracks(&self) -> bool
Returns true if this is a CacheItemType::AlbumTracks, otherwise false
Sourcepub fn as_album_tracks_mut(&mut self) -> Option<&mut Arc<Vec<LibraryTrack>>>
pub fn as_album_tracks_mut(&mut self) -> Option<&mut Arc<Vec<LibraryTrack>>>
Optionally returns mutable references to the inner fields if this is a CacheItemType::AlbumTracks, otherwise None
Sourcepub fn as_album_tracks(&self) -> Option<&Arc<Vec<LibraryTrack>>>
pub fn as_album_tracks(&self) -> Option<&Arc<Vec<LibraryTrack>>>
Optionally returns references to the inner fields if this is a CacheItemType::AlbumTracks, otherwise None
Sourcepub fn into_album_tracks(self) -> Result<Arc<Vec<LibraryTrack>>, Self>
pub fn into_album_tracks(self) -> Result<Arc<Vec<LibraryTrack>>, Self>
Returns the inner fields if this is a CacheItemType::AlbumTracks, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_artist_albums(&self) -> bool
pub fn is_artist_albums(&self) -> bool
Returns true if this is a CacheItemType::ArtistAlbums, otherwise false
Sourcepub fn as_artist_albums_mut(&mut self) -> Option<&mut Arc<Vec<LibraryAlbum>>>
pub fn as_artist_albums_mut(&mut self) -> Option<&mut Arc<Vec<LibraryAlbum>>>
Optionally returns mutable references to the inner fields if this is a CacheItemType::ArtistAlbums, otherwise None
Sourcepub fn as_artist_albums(&self) -> Option<&Arc<Vec<LibraryAlbum>>>
pub fn as_artist_albums(&self) -> Option<&Arc<Vec<LibraryAlbum>>>
Optionally returns references to the inner fields if this is a CacheItemType::ArtistAlbums, otherwise None
Sourcepub fn into_artist_albums(self) -> Result<Arc<Vec<LibraryAlbum>>, Self>
pub fn into_artist_albums(self) -> Result<Arc<Vec<LibraryAlbum>>, Self>
Returns the inner fields if this is a CacheItemType::ArtistAlbums, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_artist(&self) -> bool
pub fn is_artist(&self) -> bool
Returns true if this is a CacheItemType::Artist, otherwise false
Sourcepub fn as_artist_mut(&mut self) -> Option<&mut Arc<LibraryArtist>>
pub fn as_artist_mut(&mut self) -> Option<&mut Arc<LibraryArtist>>
Optionally returns mutable references to the inner fields if this is a CacheItemType::Artist, otherwise None
Sourcepub fn as_artist(&self) -> Option<&Arc<LibraryArtist>>
pub fn as_artist(&self) -> Option<&Arc<LibraryArtist>>
Optionally returns references to the inner fields if this is a CacheItemType::Artist, otherwise None
Sourcepub fn into_artist(self) -> Result<Arc<LibraryArtist>, Self>
pub fn into_artist(self) -> Result<Arc<LibraryArtist>, Self>
Returns the inner fields if this is a CacheItemType::Artist, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_album_mut(&mut self) -> Option<&mut Arc<LibraryAlbum>>
pub fn as_album_mut(&mut self) -> Option<&mut Arc<LibraryAlbum>>
Optionally returns mutable references to the inner fields if this is a CacheItemType::Album, otherwise None
Sourcepub fn as_album(&self) -> Option<&Arc<LibraryAlbum>>
pub fn as_album(&self) -> Option<&Arc<LibraryAlbum>>
Optionally returns references to the inner fields if this is a CacheItemType::Album, otherwise None
Sourcepub fn into_album(self) -> Result<Arc<LibraryAlbum>, Self>
pub fn into_album(self) -> Result<Arc<LibraryAlbum>, Self>
Returns the inner fields if this is a CacheItemType::Album, otherwise returns back the enum in the Err case of the result
Trait Implementations§
Source§impl Clone for CacheItemType
impl Clone for CacheItemType
Source§fn clone(&self) -> CacheItemType
fn clone(&self) -> CacheItemType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CacheItemType
impl Debug for CacheItemType
Source§impl<'de> Deserialize<'de> for CacheItemType
impl<'de> Deserialize<'de> for CacheItemType
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>,
Auto Trait Implementations§
impl Freeze for CacheItemType
impl RefUnwindSafe for CacheItemType
impl Send for CacheItemType
impl Sync for CacheItemType
impl Unpin for CacheItemType
impl UnwindSafe for CacheItemType
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
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>
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