Retrieves the GrpcMarshaller for the specified type T.
This function resolves the marshaller associated with type T through the WithGrpcMarshaller annotation.
If a config is provided, the returned marshaller will use it as the default GrpcMarshallerConfig for all encode/decode operations unless explicitly overridden. If the provided GrpcMarshallerConfig fits the marshaller's requirements, depends on the marshaller implementation.
Example:
val chatMarshaller = grpcMarshallerOf<ChatEntry>()
val encoded = chatMarshaller.encode(chatEntry)
val decoded = chatMarshaller.decode(buffer)Return
A GrpcMarshaller instance for type T.
Parameters
Optional default GrpcMarshallerConfig to use for encoding and decoding operations.
Type Parameters
The message type for which to retrieve the marshaller. Must be annotated with WithGrpcMarshaller.
See also
Retrieves the GrpcMarshaller for the specified messageType.
This function resolves the marshaller associated with the messageType through the WithGrpcMarshaller annotation. The given messageType must match the type argument T.
If a config is provided, the returned marshaller will use it as the default GrpcMarshallerConfig for all encode/decode operations unless explicitly overridden. If the provided GrpcMarshallerConfig fits the marshaller's requirements, depends on the marshaller implementation.
Example:
val chatMarshaller = grpcMarshallerOf<ChatEntry>(typeOf<ChatEntry>())
val encoded = chatMarshaller.encode(chatEntry)
val decoded = chatMarshaller.decode(buffer)Return
A GrpcMarshaller instance for type T.
Parameters
The message type KType of T for which to retrieve the marshaller. Must be annotated with WithGrpcMarshaller.
Optional default GrpcMarshallerConfig to use for encoding and decoding operations.
Type Parameters
The message type for which to retrieve the marshaller. Must be annotated with WithGrpcMarshaller.
See also
Retrieves the GrpcMarshaller for the specified messageClass.
This function resolves the marshaller associated with the messageClass through the WithGrpcMarshaller annotation.
If a config is provided, the returned marshaller will use it as the default GrpcMarshallerConfig for all encode/decode operations unless explicitly overridden. If the provided GrpcMarshallerConfig fits the marshaller's requirements, depends on the marshaller implementation.
Example:
val chatMarshaller = grpcMarshallerOf(ChatEntry::class)
val encoded = chatMarshaller.encode(chatEntry)
val decoded = chatMarshaller.decode(buffer)Return
A GrpcMarshaller instance for the messageClass.
Parameters
The message type class T for which to retrieve the marshaller. Must be annotated with WithGrpcMarshaller.
Optional default GrpcMarshallerConfig to use for encoding and decoding operations.
Type Parameters
The message type for which to retrieve the marshaller.