#[non_exhaustive]pub struct ApiObjectStringId<A> {
pub id: String,
pub type_: RelationshipType,
pub attributes: A,
pub relationships: Vec<Relationship>,
}Expand description
There might be some edge cases where some endpoints returns that returns ApiObject::id that is not an Uuid.
Currently, only the GET /manga/{id}/recommendation have that one.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: String§type_: RelationshipType§attributes: A§relationships: Vec<Relationship>Implementations§
Source§impl<A> ApiObjectStringId<A>
impl<A> ApiObjectStringId<A>
pub fn new(id: String, type_: RelationshipType, attr: A) -> Self
pub fn find_relationships(&self, type_: RelationshipType) -> Vec<&Relationship>
pub fn find_first_relationships( &self, type_: RelationshipType, ) -> Option<&Relationship>
Trait Implementations§
Source§impl<A: Clone> Clone for ApiObjectStringId<A>
impl<A: Clone> Clone for ApiObjectStringId<A>
Source§fn clone(&self) -> ApiObjectStringId<A>
fn clone(&self) -> ApiObjectStringId<A>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<A: Debug> Debug for ApiObjectStringId<A>
impl<A: Debug> Debug for ApiObjectStringId<A>
Source§impl Default for ApiObjectStringId<()>
impl Default for ApiObjectStringId<()>
Source§impl<A> Default for ApiObjectStringId<A>where
A: TypedAttributes + Default,
impl<A> Default for ApiObjectStringId<A>where
A: TypedAttributes + Default,
Source§impl<'de, A> Deserialize<'de> for ApiObjectStringId<A>where
A: Deserialize<'de>,
impl<'de, A> Deserialize<'de> for ApiObjectStringId<A>where
A: Deserialize<'de>,
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
Source§impl<T> From<ApiObject<T>> for ApiObjectStringId<T>
impl<T> From<ApiObject<T>> for ApiObjectStringId<T>
Source§impl<T> RelationedObject for ApiObjectStringId<T>
impl<T> RelationedObject for ApiObjectStringId<T>
fn find_relationships(&self, type_: RelationshipType) -> Vec<&Relationship>
fn find_first_relationships( &self, type_: RelationshipType, ) -> Option<&Relationship>
Auto Trait Implementations§
impl<A> Freeze for ApiObjectStringId<A>where
A: Freeze,
impl<A> RefUnwindSafe for ApiObjectStringId<A>where
A: RefUnwindSafe,
impl<A> Send for ApiObjectStringId<A>where
A: Send,
impl<A> Sync for ApiObjectStringId<A>where
A: Sync,
impl<A> Unpin for ApiObjectStringId<A>where
A: Unpin,
impl<A> UnwindSafe for ApiObjectStringId<A>where
A: UnwindSafe,
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