Trait MakeClassifier
trait MakeClassifier
Trait for producing response classifiers from a request.
This is useful when a classifier depends on data from the request. For example, this could include the URI or HTTP method.
This trait is generic over the Error type of the Services used with the classifier.
This is necessary for ClassifyResponse::classify_error.
Associated Types
type Classifier: TraitBound { trait_: Path { path: "ClassifyResponse", id: Id(616), args: Some(AngleBracketed { args: [], constraints: [AssocItemConstraint { name: "FailureClass", args: None, binding: Equality(Type(QualifiedPath { name: "FailureClass", args: None, self_type: Generic("Self"), trait_: Some(Path { path: "", id: Id(581), args: None }) })) }, AssocItemConstraint { name: "ClassifyEos", args: None, binding: Equality(Type(QualifiedPath { name: "ClassifyEos", args: None, self_type: Generic("Self"), trait_: Some(Path { path: "", id: Id(581), args: None }) })) }] }) }, generic_params: [], modifier: None }The response classifier produced.
type FailureClassThe type of failure classifications.
This might include additional information about the error, such as whether it was a client or server error, or whether or not it should be considered retryable.
type ClassifyEos: TraitBound { trait_: Path { path: "ClassifyEos", id: Id(621), args: Some(AngleBracketed { args: [], constraints: [AssocItemConstraint { name: "FailureClass", args: None, binding: Equality(Type(QualifiedPath { name: "FailureClass", args: None, self_type: Generic("Self"), trait_: Some(Path { path: "", id: Id(581), args: None }) })) }] }) }, generic_params: [], modifier: None }The type used to classify the response end of stream (EOS).
Required Methods
fn make_classifier<B>(self: &Self, req: &Request<B>) -> <Self as >::ClassifierReturns a response classifier for this request
Implementors
impl<C> MakeClassifier for SharedClassifier<C>