Skip to main content

ServiceSerde

Trait ServiceSerde 

Source
pub trait ServiceSerde {
    type SerdeKind;
}
Expand description

Names the error-conversion strategy of a generated service.

Every generated service implements this trait. SerdeKind is GeneratedSerde<Protocol> for generated-serde services, whose errors implement context-free IntoResponse for the statically known protocol, and SchemaSerde for schema-serde services, whose errors are serialized by the protocol routing selected per request.

Middleware generic over the service bounds Ser: ServiceSerde and uses Ser::SerdeKind as an ErrorConverter to turn operation errors into HTTP responses without a serde-mode parameter on the plugin.

Required Associated Types§

Source

type SerdeKind

Marker type implementing ErrorConverter for this service’s error types.

Implementors§