ciboulette 0.1.4

Library to parse JSON:API requests and build responses
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;
/// An outbound response, built from an inbound request.
#[derive(Debug, Getters, Serialize, Deserialize)]
#[getset(get = "pub")]
pub struct CibouletteErrorRequest<'response> {
    /// The body of the response.
    pub errors: CibouletteErrorObj<'response>,
    /// The status of the response
    #[serde(skip_serializing_if = "Option::is_none")]
    pub meta: Option<Value>,
}

impl<'response> CibouletteErrorRequest<'response> {
    pub fn new(errors: CibouletteErrorObj<'response>, meta: Option<Value>) -> Self {
        CibouletteErrorRequest { errors, meta }
    }
}