(self,
value # type: Union[bytes,bytearray]
)
| 217 | |
| 218 | class RawBinaryTranscoder(Transcoder): |
| 219 | def encode_value(self, |
| 220 | value # type: Union[bytes,bytearray] |
| 221 | ) -> Tuple[bytes, int]: |
| 222 | |
| 223 | if isinstance(value, (bytes, bytearray)): |
| 224 | if isinstance(value, bytearray): |
| 225 | value = bytes(value) |
| 226 | return value, FMT_BYTES |
| 227 | else: |
| 228 | raise ValueFormatException("Only binary data supported by RawBinaryTranscoder") |
| 229 | |
| 230 | def decode_value(self, |
| 231 | value, # type: bytes |
nothing calls this directly
no test coverage detected