Trait rustiful::JsonApiResource [] [src]

pub trait JsonApiResource: Sized {
    type Params: Default;
    type SortField;
    type FilterField;
    type JsonApiIdType: FromStr + Debug;
    fn resource_name() -> &'static str;

    fn from_str<'a>(
        query_string: &'a str
    ) -> Result<JsonApiParams<Self::FilterField, Self::SortField>, QueryStringParseError>
    where
        Self::SortField: for<'b> TryFrom<(&'b str, SortOrder), Error = QueryStringParseError>,
        Self::FilterField: for<'b> TryFrom<(&'b str, Vec<&'b str>), Error = QueryStringParseError>
, { ... } }

This trait is implemented for any type that derives the JsonApi attribute.

Associated Types

An alias for JsonApiParams<Self::SortField, Self::FilterField>

This type is generated in rustiful-derive.

This type is generated in rustiful-derive.

The type of a field named id or the type of a field that has the #[JsonApiId] attribute on the type deriving JsonApi.

Required Methods

This is the pluralized lower-cased name of the type deriving JsonApi.

Provided Methods

Implementors