Module api

Source
Expand description

Defines custom types and structs primarily that composite the JSON:API document

Structs§

DocumentData
A struct that defines properties for a JSON:API document that contains no errors
DocumentError
A struct that defines an error state for a JSON:API document
ErrorSource
Error location
JsonApiError
Retpresentation of a JSON:API error (all fields are optional)
JsonApiInfo
Optional JsonApiDocument payload identifying the JSON-API version the server implements
Pagination
Pagination links
Patch
PatchSet
Relationship
Relationship with another object
Resource
Representation of a JSON:API resource. This is a struct that contains attributes that map to the JSON:API specification of id, type, attributes, relationships, links, and meta
ResourceIdentifier
Resource Identifier

Enums§

DiffPatchError
DocumentValidationError
Enum to describe top-level JSON:API specification violations
IdentifierData
Valid Resource Identifier (can be None)
JsonApiDataError
JsonApiDocument
An enum that defines the possible composition of a JSON:API document - one which contains error or data - but not both. Rely on Rust’s type system to handle this basic validation instead of running validators on parsed documents
PatchType
PrimaryData
Valid data Resource (can be None)
RelationshipAssumptionError

Type Aliases§

Included
Side-loaded Resources
JsonApiErrors
Data-related errors
JsonApiId
JsonApiIds
JsonApiValue
Permitted JSON-API values (all JSON Values)
Links
Meta
Meta-data object, can contain any data
Relationships
Map of relationships with other objects
ResourceAttributes
Resource Attributes, can be any JSON value
ResourceIdentifiers
Vector of ResourceIdentifiers
Resources
Vector of Resource