Trait REST

Source
pub trait REST: Serialize + DeserializeOwned {
    type Index;

    // Required method
    fn path() -> String;
}
Expand description

Denotes a payload that is accessed with a REST API.

Required Associated Types§

Source

type Index

The index type that identifies individual resource from collection, e.g. username for users.

Required Methods§

Source

fn path() -> String

The path on the server to send request to.

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§