refactor!: refactored response models
doc: documented all public methods
This commit is contained in:
parent
4c1876cb55
commit
f526ab38eb
37 changed files with 600 additions and 255 deletions
|
|
@ -3,10 +3,19 @@ use super::{
|
|||
MusicPlaylistItem, PlaylistItem, TrackItem, VideoItem, YouTubeItem,
|
||||
};
|
||||
|
||||
/// Trait for casting generic YouTube/YouTube music items to a specific kind.
|
||||
///
|
||||
/// Returns [`None`] if the item does not match.
|
||||
pub trait FromYtItem: Sized {
|
||||
/// Casting from a generic YouTube item to a specific kind
|
||||
///
|
||||
/// Returns [`None`] if the item does not match.
|
||||
fn from_yt_item(_item: YouTubeItem) -> Option<Self> {
|
||||
None
|
||||
}
|
||||
/// Casting from a generic YouTube Music item to a specific kind
|
||||
///
|
||||
/// Returns [`None`] if the item does not match.
|
||||
fn from_ytm_item(_item: MusicItem) -> Option<Self> {
|
||||
None
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue