rust_anilist::models

Struct Anime

Source
pub struct Anime {
Show 40 fields pub id: i64, pub id_mal: Option<i64>, pub title: Title, pub format: Format, pub status: Status, pub description: String, pub start_date: Option<Date>, pub end_date: Option<Date>, pub season: Option<Season>, pub season_year: Option<u32>, pub season_int: Option<u64>, pub episodes: Option<u16>, pub duration: Option<u8>, pub country_of_origin: Option<String>, pub is_licensed: Option<bool>, pub source: Option<Source>, pub hashtag: Option<String>, pub updated_at: Option<u64>, pub cover: Cover, pub banner: Option<String>, pub genres: Option<Vec<String>>, pub synonyms: Option<Vec<String>>, pub average_score: Option<u8>, pub mean_score: Option<u8>, pub popularity: Option<u32>, pub is_locked: Option<bool>, pub trending: Option<u32>, pub favourites: Option<u32>, pub tags: Option<Vec<Tag>>, pub relations: Option<Vec<Relation>>, pub characters: Option<Vec<Character>>, pub staff: Option<Vec<Person>>, pub studios: Option<Vec<Studio>>, pub is_favourite: Option<bool>, pub is_favourite_blocked: Option<bool>, pub is_adult: Option<bool>, pub next_airing_episode: Option<AiringSchedule>, pub external_links: Option<Vec<Link>>, pub streaming_episodes: Option<Vec<Link>>, pub url: String, /* private fields */
}
Expand description

Represents an anime with various attributes.

The Anime struct contains detailed information about an anime, including its ID, title, format, status, description, dates, season, episodes, duration, country of origin, licensing status, source, hashtags, images, genres, synonyms, scores, popularity, tags, relations, characters, staff, studios, and other metadata.

§Fields

  • id - The ID of the anime.
  • id_mal - The ID of the anime on MAL (MyAnimeList).
  • title - The title of the anime.
  • format - The format of the anime (e.g., TV, movie).
  • status - The status of the anime (e.g., airing, completed).
  • description - The description of the anime.
  • start_date - The start date of the anime.
  • end_date - The end date of the anime.
  • season - The season of the anime.
  • season_year - The year of the season of the anime.
  • season_int - The integer representation of the season of the anime.
  • episodes - The number of episodes of the anime.
  • duration - The duration of the episodes of the anime.
  • country_of_origin - The country of origin of the anime.
  • is_licensed - Whether the anime is licensed or not.
  • source - The source of the anime (e.g., manga, light novel).
  • hashtag - The hashtag of the anime.
  • updated_at - The updated date of the anime.
  • cover - The cover image of the anime.
  • banner - The banner image of the anime.
  • genres - The genres of the anime.
  • synonyms - The synonyms of the anime.
  • average_score - The average score of the anime.
  • mean_score - The mean score of the anime.
  • popularity - The popularity of the anime.
  • is_locked - Whether the anime is locked or not.
  • trending - The trending of the anime.
  • favourites - The number of favourites of the anime.
  • tags - The tags of the anime.
  • relations - The relations of the anime.
  • characters - The characters of the anime.
  • staff - The staff of the anime.
  • studios - The studios of the anime.
  • is_favourite - Whether the anime is favourite or not.
  • is_favourite_blocked - Whether the anime is favourite blocked or not.
  • is_adult - Whether the anime is adult or not.
  • next_airing_episode - The next airing episode of the anime.
  • external_links - The external links of the anime.
  • streaming_episodes - The streaming episodes of the anime.
  • url - The site URL of the anime.

Fields§

§id: i64

The ID of the anime.

§id_mal: Option<i64>

The ID of the anime on MAL.

§title: Title

The title of the anime.

§format: Format

The format of the anime.

§status: Status

The status of the anime.

§description: String

The description of the anime.

§start_date: Option<Date>

The start date of the anime.

§end_date: Option<Date>

The end date of the anime.

§season: Option<Season>

The season of the anime.

§season_year: Option<u32>

The year of the season of the anime.

§season_int: Option<u64>

The integer representation of the season of the anime.

§episodes: Option<u16>

The number of episodes of the anime.

§duration: Option<u8>

The duration of the episodes of the anime.

§country_of_origin: Option<String>

The country of origin of the anime.

§is_licensed: Option<bool>

Whether the anime is licensed or not.

§source: Option<Source>

The source of the anime.

§hashtag: Option<String>

The hashtag of the anime.

§updated_at: Option<u64>

The updated date of the anime.

§cover: Cover

The cover image of the anime.

§banner: Option<String>

The banner image of the anime.

§genres: Option<Vec<String>>

The genres of the anime.

§synonyms: Option<Vec<String>>

The synonyms of the anime.

§average_score: Option<u8>

The average score of the anime.

§mean_score: Option<u8>

The mean score of the anime.

§popularity: Option<u32>

The popularity of the anime.

§is_locked: Option<bool>

Whether the anime is locked or not.

§trending: Option<u32>

The trending of the anime.

§favourites: Option<u32>

The number of favourites of the anime.

§tags: Option<Vec<Tag>>

The tags of the anime.

§relations: Option<Vec<Relation>>

The relations of the anime.

§characters: Option<Vec<Character>>

The characters of the anime.

§staff: Option<Vec<Person>>

The staff of the anime.

§studios: Option<Vec<Studio>>

The studios of the anime.

§is_favourite: Option<bool>

Whether the anime is favourite or not.

§is_favourite_blocked: Option<bool>

Whether the anime is favourite blocked or not.

§is_adult: Option<bool>

Whether the anime is adult or not.

§next_airing_episode: Option<AiringSchedule>

The next airing episode of the anime.

§external_links: Option<Vec<Link>>

The external links of the anime.

§streaming_episodes: Option<Vec<Link>>

The streaming episodes of the anime.

§url: String

The site URL of the anime.

Implementations§

Source§

impl Anime

Source

pub async fn load_full(self) -> Result<Self>

Loads the full details of the anime.

§Errors

Returns an error if the anime details cannot be loaded.

§Panics

Panics if the anime is already fully loaded.

§Example
let anime = anime.load_full().await?;

Trait Implementations§

Source§

impl Clone for Anime

Source§

fn clone(&self) -> Anime

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Anime

Source§

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

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

impl Default for Anime

Source§

fn default() -> Anime

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Anime

Source§

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

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Anime

Source§

fn eq(&self, other: &Anime) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Anime

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Anime

Auto Trait Implementations§

§

impl Freeze for Anime

§

impl RefUnwindSafe for Anime

§

impl Send for Anime

§

impl Sync for Anime

§

impl Unpin for Anime

§

impl UnwindSafe for Anime

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, dst: *mut u8)

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. 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> MaybeSendSync for T