pub struct Relation {
pub media_type: MediaType,
pub anime: Option<Anime>,
pub manga: Option<Manga>,
pub id: i64,
pub relation_type: RelationType,
pub is_main_studio: bool,
}
Expand description
Represents a relation between different media types.
The Relation
struct contains information about the relationship
between different media types, such as anime and manga, including
the media type, related anime or manga, relation ID, relation type,
and whether it is the main studio.
§Fields
media_type
- The type of media (e.g., anime, manga).anime
- An optional related anime.manga
- An optional related manga.id
- The ID of the relation.relation_type
- The type of relation (e.g., adaptation, sequel).is_main_studio
- Whether the relation is the main studio.
Fields§
§media_type: MediaType
The type of media (e.g., anime, manga).
anime: Option<Anime>
An optional related anime.
manga: Option<Manga>
An optional related manga.
id: i64
The ID of the relation.
relation_type: RelationType
The type of relation (e.g., adaptation, sequel).
is_main_studio: bool
Whether the relation is the main studio.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Relation
impl<'de> Deserialize<'de> for Relation
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 StructuralPartialEq for Relation
Auto Trait Implementations§
impl Freeze for Relation
impl RefUnwindSafe for Relation
impl Send for Relation
impl Sync for Relation
impl Unpin for Relation
impl UnwindSafe for Relation
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