docarray.document.mixins.protobuf module# class docarray.document.mixins.protobuf.ProtobufMixin[source]# Bases: object classmethod from_protobuf(pb_msg)[source]# Return type: T to_protobuf(ndarray_type=None)[source]# Convert Document into a Protobuf message. Parameters: ndarray_type (Optional[str]) – can be list or numpy, if set it will force all ndarray-like object to be List or numpy.ndarray. Return type: DocumentProto Returns: the protobuf message