pub enum Item {
Movie(Movie),
Show(Show),
Season(Season),
Episode(Episode),
Artist(Artist),
Album(Album),
Track(Track),
}Expand description
Any one item a catalog returns. On the wire it is the item’s own object
with a kind field added, for example {"kind": "movie", "id": …}.
Variants§
Implementations§
Source§impl Item
impl Item
Sourcepub fn caption_parts(&self, today: CalendarDate) -> Option<Caption>
pub fn caption_parts(&self, today: CalendarDate) -> Option<Caption>
What a card says under its title on today; None for an artist
or where nothing is known.
pub fn id(&self) -> &MediaId
Sourcepub fn title(&self) -> &str
pub fn title(&self) -> &str
Its own name: a film’s, an episode’s or a track’s title; an artist’s name.
Sourcepub fn playback(&self) -> Option<&PlaybackState>
pub fn playback(&self) -> Option<&PlaybackState>
The user’s progress on a film, an episode or a track; None for
the kinds that do not play themselves.
Sourcepub fn is_watched(&self) -> bool
pub fn is_watched(&self) -> bool
The user watched it (or played it to its end).
Sourcepub fn resume_position(&self) -> Option<Duration>
pub fn resume_position(&self) -> Option<Duration>
Where the user stopped in it, watched or not.
Sourcepub fn resume_from(&self) -> Option<Duration>
pub fn resume_from(&self) -> Option<Duration>
Where a Play goes on from (PlaybackState::resume_from).
Sourcepub fn progress(&self) -> Option<Progress>
pub fn progress(&self) -> Option<Progress>
How far through it the user is (PlaybackState::progress);
None for the kinds that do not play themselves.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Item
impl<'de> Deserialize<'de> for Item
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
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