pub trait APICall {
type Request: Serialize + DeserializeOwned;
type Response: Serialize + DeserializeOwned;
type Error: Serialize + DeserializeOwned + IntoResponse + From<InternalServerError>;
const ENDPOINT: &str;
}Expand description
Trait that describes a possible API call over NATS
Required Associated Constants§
Required Associated Types§
Sourcetype Request: Serialize + DeserializeOwned
type Request: Serialize + DeserializeOwned
The request type
Sourcetype Response: Serialize + DeserializeOwned
type Response: Serialize + DeserializeOwned
The response type
Sourcetype Error: Serialize + DeserializeOwned + IntoResponse + From<InternalServerError>
type Error: Serialize + DeserializeOwned + IntoResponse + From<InternalServerError>
The error type
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".