pub trait ApiEndpoint {
type Path: PathParts;
type Req: Serialize;
type Res: DeserializeOwned + Serialize + 'static;
type Err: DeserializeOwned + Serialize + Error + 'static;
const METHOD: Method;
}
Expand description
Represents a A endpoint that the backend will support, and how to call it.
Required Associated Constants§
Required Associated Types§
Sourcetype Res: DeserializeOwned + Serialize + 'static
type Res: DeserializeOwned + Serialize + 'static
The response type for this endpoint.
Sourcetype Err: DeserializeOwned + Serialize + Error + 'static
type Err: DeserializeOwned + Serialize + Error + 'static
The (inner) error type for this endpoint.
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.