HateoasResource

Trait HateoasResource 

Source
pub trait HateoasResource {
    const KIND: &'static str;
    const VERSION: &'static str;
    const GROUP: &'static str;
    const URL_PATH_SEGMENT: &'static str;
}

Required Associated Constants§

Source

const KIND: &'static str

The constant that defines what type of resources is being send.

Source

const VERSION: &'static str

The version of the schema used for the expected resource

Source

const GROUP: &'static str

What group this resource belongs under. This is usually same as the app domain or package domain.

Source

const URL_PATH_SEGMENT: &'static str

This is the current groups/resource url endpoint, this allows for different endpoints for each type/group/version. an endpoint could be generated as follows: /[Group]/[Version]/[URL_PATH_SEGMENT]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl HateoasResource for u16

Source§

const KIND: &'static str = "U16"

Source§

const VERSION: &'static str = "0.0.1"

Source§

const GROUP: &'static str = "hateoas.io"

Source§

const URL_PATH_SEGMENT: &'static str = "u16"

Source§

impl HateoasResource for u32

Source§

const KIND: &'static str = "U32"

Source§

const VERSION: &'static str = "0.0.1"

Source§

const GROUP: &'static str = "hateoas.io"

Source§

const URL_PATH_SEGMENT: &'static str = "u32"

Source§

impl HateoasResource for ()

Source§

const KIND: &'static str = "Void"

Source§

const VERSION: &'static str = "0.0.1"

Source§

const GROUP: &'static str = "hateoas.io"

Source§

const URL_PATH_SEGMENT: &'static str = "void"

Source§

impl HateoasResource for String

Source§

const KIND: &'static str = "String"

Source§

const VERSION: &'static str = "0.0.1"

Source§

const GROUP: &'static str = "hateoas.io"

Source§

const URL_PATH_SEGMENT: &'static str = "string"

Source§

impl HateoasResource for HashMap<String, String>

Source§

const KIND: &'static str = "HashMap"

Source§

const VERSION: &'static str = "0.0.1"

Source§

const GROUP: &'static str = "hateoas.io"

Source§

const URL_PATH_SEGMENT: &'static str = "hashmap"

Implementors§