Trait EndpointSpec

Source
pub trait EndpointSpec {
    type Req: Serialize;
    type Resp: DeserializeOwned;

    const PATH: &'static str;
    const METHOD: Method = Method::POST;
}

Required Associated Constants§

Source

const PATH: &'static str

Provided Associated Constants§

Source

const METHOD: Method = Method::POST

Required Associated Types§

Source

type Req: Serialize

JSON body you send - Use () to not send anything.

Source

type Resp: DeserializeOwned

Typed payload you expect back on success

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.

Implementors§