pub struct JsonApi { /* private fields */ }
Implementations§
Source§impl JsonApi
impl JsonApi
pub fn new() -> Self
pub fn data(resource: impl ResourceTrait) -> Self
pub fn collection(resources: Vec<impl ResourceTrait>) -> Self
pub fn error(error: JsonApiError) -> Self
pub fn errors(errors: Vec<JsonApiError>) -> Self
pub fn links(&mut self, links: Vec<Link<'_, '_>>) -> &mut Self
pub fn to_response(&self) -> Result<Self, Vec<ValidationError>>
Trait Implementations§
Source§impl Deserialize<'static> for JsonApi
impl Deserialize<'static> for JsonApi
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for JsonApi
impl RefUnwindSafe for JsonApi
impl Send for JsonApi
impl Sync for JsonApi
impl Unpin for JsonApi
impl UnwindSafe for JsonApi
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