Move raw bytes handling to Encoder/Decoder.
This commit is contained in:
parent
e5d09fbbe9
commit
09a638820e
9 changed files with 84 additions and 49 deletions
|
@ -472,6 +472,11 @@ macro_rules! implement_ty_decoder {
|
|||
read_str -> Cow<'_, str>;
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn read_raw_bytes(&mut self, bytes: &mut [std::mem::MaybeUninit<u8>]) -> Result<(), Self::Error> {
|
||||
self.opaque.read_raw_bytes(bytes)
|
||||
}
|
||||
|
||||
fn error(&mut self, err: &str) -> Self::Error {
|
||||
self.opaque.error(err)
|
||||
}
|
||||
|
|
|
@ -1167,6 +1167,7 @@ where
|
|||
emit_f32(f32);
|
||||
emit_char(char);
|
||||
emit_str(&str);
|
||||
emit_raw_bytes(&[u8]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue