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§

Trait Implementations§

source§

impl<A: Clone> Clone for ApiObject<A>

source§

fn clone(&self) -> ApiObject<A>

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<A: Debug> Debug for ApiObject<A>

source§

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

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

impl<A: Default> Default for ApiObject<A>

source§

fn default() -> ApiObject<A>

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

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>,

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

impl<A> FromResponse for ApiObject<A>

§

type Response = ApiObject<A>

source§

fn from_response(value: Self::Response) -> Self

source§

impl<A> NamedType for ApiObject<A>where A: Type + 'static,

source§

fn named_data_type( opts: DefOpts<'_>, generics: &[DataType] ) -> Result<NamedDataType, ExportError>

this is equivalent to Type::inline but returns a NamedDataType instead. This is a compile-time guaranteed alternative to extracting the DataType::Named variant.
source§

fn definition_named_data_type( opts: DefOpts<'_> ) -> Result<NamedDataType, ExportError>

this is equivalent to Type::definition but returns a NamedDataType instead. This is a compile-time guaranteed alternative to extracting the DataType::Named variant.
source§

impl<T> PartialEq for ApiObject<T>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<A> Type for ApiObject<A>where A: Type + 'static,

source§

fn inline( opts: DefOpts<'_>, generics: &[DataType] ) -> Result<DataType, ExportError>

Returns the inline definition of a type with generics substituted for those provided. This function defines the base structure of every type, and is used in both definition and reference Read more
source§

fn category_impl( opts: DefOpts<'_>, generics: &[DataType] ) -> Result<TypeCategory, ExportError>

Defines which category this type falls into, determining how references to it are created. See TypeCategory for more info. Read more
source§

fn definition_generics() -> Vec<GenericType>

Returns the type parameter generics of a given type. Will usually be empty except for custom types. Read more
source§

fn definition(opts: DefOpts<'_>) -> Result<DataType, ExportError>

Small wrapper around inline that provides definition_generics as the value for the generics arg. Read more
source§

fn reference( opts: DefOpts<'_>, generics: &[DataType] ) -> Result<DataType, ExportError>

Generates a datatype corresponding to a reference to this type, as determined by its category. Getting a reference to a type implies that it should belong in the type map (since it has to be referenced from somewhere), so the output of definition will be put into the type map. Read more
source§

impl<A> Flatten for ApiObject<A>where A: Type + 'static,

Auto Trait Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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

impl<T> WithSubscriber for T

§

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
§

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 Twhere T: for<'de> Deserialize<'de>,