Service class abstract interface

Something that answers a request.

The Dart counterpart of tower's Service, which axum's serve is generic over. Its call method is the whole contract, so an implementation is assignable to a shelf Handler without conversion: Dart tears off call implicitly when an object is used where a function type is wanted.

tower's poll_ready has no counterpart and cannot have one — a function cannot decline before it is called — so backpressure is not expressible here. See docs/design/server-axum-parity.md.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(Request request) FutureOr<Response>
Answers request.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited