The metadata frames a transport builds itself rather than receives: status trailers, the cancellation notice, and the trailers a caller synthesizes for a response that is not gRPC.
Every status trailer goes through status, so grpc-message is
always percent-encoded the same way and trimmed to maxMessageLength when
given. A trailer that fails the policy's header check is never sent, and
the caller then reports a call with no status at all.
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
-
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
Static Methods
-
cancelled(
String reason) → RpcMetadata -
The cancellation notice:
x-rpc-client-cancelled, itsreason, and CANCELLED. -
forError(
Object error, {int? maxMessageLength}) → RpcMetadata -
The trailer answering
error, which a handler or the code around it threw: through wireStatusFor, so a foreign error's text stays on this side. -
fromHttpStatus(
int httpStatus, {String? detail, int? maxMessageLength}) → RpcMetadata -
What a caller reports for a response with HTTP status
httpStatusother than 200: the status grpcStatusFromHttpStatus gives it, and the messageHTTP <status>followed bydetailwhen given. -
of(
RpcStatusException error, {int? maxMessageLength}) → RpcMetadata -
The trailer carrying
error's status, message and details. -
status(
RpcStatus status, {String message = '', Uint8List? statusDetailsBin, int? maxMessageLength}) → RpcMetadata -
A status trailer:
status,messageand details. -
unexpectedContentType(
String? contentType, {int? maxMessageLength}) → RpcMetadata -
What a caller reports for a 200 response whose content-type is not
gRPC: INTERNAL, naming the
contentTypeit got.