Skip to main content

Episode

Struct Episode 

Source
pub struct Episode {
Show 17 fields pub title: String, pub year: Option<u32>, pub released: Option<String>, pub pk: Option<u32>, pub ids: Option<MediaIds>, pub season: u32, pub episode: u32, pub watched: Option<bool>, pub last_watched_at: Option<String>, pub watchers: Option<u32>, pub plays: Option<u32>, pub img: Option<String>, pub overview: Option<String>, pub rating: Option<f32>, pub votes: Option<u32>, pub runtime: Option<u32>, pub user_rating: Option<u8>,
}
Expand description

A single episode as returned by GET /tv/episodes/{show_id} and friends. Everything except the ordinal fields is optional — old episodes often lack images, overviews, and community stats.

Fields§

§title: String

Episode title.

§year: Option<u32>

Release year, if known.

§released: Option<String>

ISO-8601 release timestamp.

§pk: Option<u32>

Simkl’s internal primary-key. Numeric.

§ids: Option<MediaIds>

External identifier bag.

§season: u32

1-based season number.

§episode: u32

1-based episode number within the season.

§watched: Option<bool>

Whether the authenticated user has watched this episode.

§last_watched_at: Option<String>

ISO-8601 timestamp of the user’s last watch, if any.

§watchers: Option<u32>

Number of users who have watched the episode at least once.

§plays: Option<u32>

Total playcount across all users.

§img: Option<String>

CDN hash for the episode still. Assemble with crate::images.

§overview: Option<String>

Prose episode summary.

§rating: Option<f32>

Community rating on a 0–10 scale.

§votes: Option<u32>

Number of community rating votes.

§runtime: Option<u32>

Runtime in minutes.

§user_rating: Option<u8>

The authenticated user’s own 1–10 rating, if any.

Trait Implementations§

Source§

impl Clone for Episode

Source§

fn clone(&self) -> Episode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Episode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Episode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.