RequestCancellation class final

Cancellation signal for an inbound JSON-RPC request.

Handlers that can stop cooperatively should await whenCancelled or check isCancelled between units of work. The handler's reply is always delivered to the original request — its result, or a thrown RpcError such as one built from ErrorCode.requestCancelled — because the ACP contract guarantees the requesting side a response; cancellation never suppresses it.

Properties

hashCode int
The hash code for this object.
no setterinherited
isCancelled bool
Whether the peer cancelled the request.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
whenCancelled Future<void>
Completes when the peer cancels the request.
no setter

Methods

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