(self,
value, # type: bytes
flags # type: int
)
| 199 | raise ValueFormatException("Only string data supported by RawStringTranscoder") |
| 200 | |
| 201 | def decode_value(self, |
| 202 | value, # type: bytes |
| 203 | flags # type: int |
| 204 | ) -> Union[str, bytes]: |
| 205 | |
| 206 | format = get_decode_format(flags) |
| 207 | |
| 208 | if format == FMT_BYTES: |
| 209 | raise ValueFormatException("Binary format type not supported by RawStringTranscoder") |
| 210 | elif format == FMT_UTF8: |
| 211 | return value.decode('utf-8') |
| 212 | elif format == FMT_JSON: |
| 213 | raise ValueFormatException("JSON format type not supported by RawStringTranscoder") |
| 214 | else: |
| 215 | raise ValueFormatException(f"Unrecognized format provided: {format}") |
| 216 | |
| 217 | |
| 218 | class RawBinaryTranscoder(Transcoder): |
nothing calls this directly
no test coverage detected