ContextExtractable<T> class
final
Extracts a value middleware stored in the shelf request context.
For values middleware stored under a name of its own. Application state
should use @State() and withState instead, which key by type. A missing
or wrongly typed value is a 500, since it means the middleware did not run
or wrote something else.
- Implemented types
- Available extensions
Constructors
- ContextExtractable(String key)
-
Reads the context entry named
key.const
Properties
Methods
-
extract(
Request request) → Future< Result< T, Rejection> > -
Produces the value, or the rejection that stops the handler.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
require(
Request request) → Future< T> -
Available on FromRequestParts<
Extracts the value, throwing the Rejection when extraction fails.T> , provided by the RequireExtraction extension -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited