pub struct Person {Show 18 fields
pub id: i64,
pub name: Name,
pub language: Language,
pub image: Option<Image>,
pub description: Option<String>,
pub primary_occupations: Option<Vec<String>>,
pub gender: Gender,
pub date_of_birth: Option<Date>,
pub date_of_death: Option<Date>,
pub age: Option<i64>,
pub home_town: Option<String>,
pub blood_type: Option<String>,
pub is_favourite: Option<bool>,
pub is_favourite_blocked: Option<bool>,
pub url: String,
pub characters: Option<Vec<Character>>,
pub favourites: i64,
pub mod_notes: Option<String>,
/* private fields */
}
Expand description
Represents a person.
Fields§
§id: i64
The ID of the person.
name: Name
The name of the person.
language: Language
The language of the person.
image: Option<Image>
The image of the person, if any.
description: Option<String>
The description of the person, if any.
primary_occupations: Option<Vec<String>>
The primary occupations of the person, if any.
gender: Gender
The gender of the person.
date_of_birth: Option<Date>
The date of birth of the person, if any.
date_of_death: Option<Date>
The date of death of the person, if any.
age: Option<i64>
The age of the person, if any.
home_town: Option<String>
The hometown of the person, if any.
blood_type: Option<String>
The blood type of the person, if any.
is_favourite: Option<bool>
Whether the person is a favorite, if any.
is_favourite_blocked: Option<bool>
Whether the person is blocked from being a favorite, if any.
url: String
The URL of the person’s site.
characters: Option<Vec<Character>>
The characters associated with the person, if any.
favourites: i64
The number of favorites the person has.
mod_notes: Option<String>
The moderator notes for the person, if any.
Implementations§
Source§impl Person
impl Person
Sourcepub async fn get_medias<T>(&self) -> Result<T>
pub async fn get_medias<T>(&self) -> Result<T>
Sourcepub async fn get_character_medias<T>(&self, _character_id: i64) -> Result<T>
pub async fn get_character_medias<T>(&self, _character_id: i64) -> Result<T>
Retrieves the media associated with a character.
§Arguments
character_id
- The ID of the character whose media is to be retrieved.
§Errors
Returns an error if the media cannot be retrieved.
§Type Parameters
T
- The type of the media to be returned.
§Example
let char_mangas = person.get_character_medias::<Manga>(1).await?;