implement encode_constant and add term tags for encoding

This commit is contained in:
Kasey White
2022-05-23 02:22:37 -04:00
parent 52f9f5ab41
commit c38da6426f
2 changed files with 67 additions and 7 deletions

View File

@@ -60,6 +60,13 @@ impl Encode for &[u8] {
}
}
impl<T: Encode> Encode for Box<T> {
fn encode(&self, e: &mut Encoder) -> Result<(), String> {
self.as_ref().encode(e)?;
Ok(())
}
}
impl<T, K> Encode for (T, K)
where
T: Encode,