pub struct ApiObject<A> {
pub id: Uuid,
pub type_: RelationshipType,
pub attributes: A,
pub relationships: Vec<Relationship>,
}
Fields§
§id: Uuid
§type_: RelationshipType
§attributes: A
§relationships: Vec<Relationship>
Implementations§
Source§impl<A> ApiObject<A>
impl<A> ApiObject<A>
pub fn find_relationships(&self, type_: RelationshipType) -> Vec<&Relationship>
pub fn find_first_relationships( &self, type_: RelationshipType, ) -> Option<&Relationship>
Source§impl<T> ApiObject<T>
impl<T> ApiObject<T>
pub fn drop_relationships(self) -> ApiObjectNoRelationships<T>
Trait Implementations§
Source§impl<'de, A> Deserialize<'de> for ApiObject<A>where
A: Deserialize<'de>,
impl<'de, A> Deserialize<'de> for ApiObject<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 ApiObjectNoRelationships<T>
impl<T> From<ApiObject<T>> for ApiObjectNoRelationships<T>
Source§impl<T> From<ApiObjectNoRelationships<T>> for ApiObject<T>
impl<T> From<ApiObjectNoRelationships<T>> for ApiObject<T>
Source§fn from(value: ApiObjectNoRelationships<T>) -> Self
fn from(value: ApiObjectNoRelationships<T>) -> Self
Converts to this type from the input type.
Source§impl<A> FromResponse for ApiObject<A>
impl<A> FromResponse for ApiObject<A>
Auto Trait Implementations§
impl<A> Freeze for ApiObject<A>where
A: Freeze,
impl<A> RefUnwindSafe for ApiObject<A>where
A: RefUnwindSafe,
impl<A> Send for ApiObject<A>where
A: Send,
impl<A> Sync for ApiObject<A>where
A: Sync,
impl<A> Unpin for ApiObject<A>where
A: Unpin,
impl<A> UnwindSafe for ApiObject<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