Struct ciboulette::CibouletteBodyBuilder[][src]

pub struct CibouletteBodyBuilder<'request> { /* fields omitted */ }

Implementations

impl<'request> CibouletteBodyBuilder<'request>[src]

pub fn jsonapi(&self) -> &Option<CibouletteJsonApiVersion<'request>>[src]

The semver of the JSON:API specs

pub fn data(&self) -> &CibouletteBodyDataBuilder<'request>[src]

The data of the request/response. Cannot be set with errors.

pub fn errors(&self) -> &Option<CibouletteErrorObj<'request>>[src]

The error object of the response. Cannot be set with data.

pub fn meta(&self) -> &Option<Value>[src]

Links to the current object/relationship

pub fn included(&self) -> &Vec<CibouletteResourceBuilder<'request>>[src]

The included objects. Cannot be set without data

impl<'request> CibouletteBodyBuilder<'request>[src]

pub fn jsonapi_mut(&mut self) -> &mut Option<CibouletteJsonApiVersion<'request>>[src]

The semver of the JSON:API specs

pub fn data_mut(&mut self) -> &mut CibouletteBodyDataBuilder<'request>[src]

The data of the request/response. Cannot be set with errors.

pub fn errors_mut(&mut self) -> &mut Option<CibouletteErrorObj<'request>>[src]

The error object of the response. Cannot be set with data.

pub fn meta_mut(&mut self) -> &mut Option<Value>[src]

Links to the current object/relationship

pub fn included_mut(&mut self) -> &mut Vec<CibouletteResourceBuilder<'request>>[src]

The included objects. Cannot be set without data

impl<'request> CibouletteBodyBuilder<'request>[src]

pub fn check<'c>(
    intention: &CibouletteIntention,
    data: &'c CibouletteBodyData<'request, CibouletteResourceIdentifierPermissive<'request>, MessyJsonObjectValue<'request>>,
    included: &'c [CibouletteResource<'request, MessyJsonObjectValue<'request>, CibouletteResourceIdentifierPermissive<'request>>],
    errors: &'c Option<CibouletteErrorObj<'request>>
) -> Result<(), CibouletteError>
[src]

Perfom all the document checks

pub fn build(
    self,
    bag: &CibouletteStore,
    intention: &CibouletteIntention
) -> Result<CibouletteBody<'request, CibouletteResourceIdentifierPermissive<'request>, MessyJsonObjectValue<'request>>, CibouletteError>
[src]

Build a CibouletteBody from the builder.

Runs check before building

Trait Implementations

impl<'request> Debug for CibouletteBodyBuilder<'request>[src]

impl<'de> Deserialize<'de> for CibouletteBodyBuilder<'de>[src]

Auto Trait Implementations

impl<'request> RefUnwindSafe for CibouletteBodyBuilder<'request>

impl<'request> Send for CibouletteBodyBuilder<'request>

impl<'request> Sync for CibouletteBodyBuilder<'request>

impl<'request> Unpin for CibouletteBodyBuilder<'request>

impl<'request> UnwindSafe for CibouletteBodyBuilder<'request>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.