Source code for jina.proto.serializer

from .. import Request


[docs]class RequestProto: """This class is a drop-in replacement for gRPC default serializer. It replace default serializer to make sure we always work with `Request` """
[docs] @staticmethod def SerializeToString(x: 'Request'): return x.proto.SerializeToString()
[docs] @staticmethod def FromString(x: bytes): return Request(x)