Support deserialization into byte arrays for BLOB's via serde_bytes.

This commit is contained in:
Stephen Chung
2021-12-02 14:10:53 +08:00
parent 70f4c53854
commit 41dd989866
6 changed files with 49 additions and 13 deletions

View File

@@ -2109,6 +2109,9 @@ impl Dynamic {
v.try_cast::<T>().ok_or_else(|| typ)
})
.collect(),
Union::Blob(_, _, _) if TypeId::of::<T>() == TypeId::of::<u8>() => {
Ok(self.cast::<Vec<T>>())
}
#[cfg(not(feature = "no_closure"))]
Union::Shared(cell, _, _) => {
#[cfg(not(feature = "sync"))]