serde_with v1.9.3
Added
-
The
Bytes
type now supports borrowed and Cow arrays of fixed size (requires Rust 1.51+)#[serde_as(as = "Bytes")] #[serde(borrow)] borrowed_array: &'a [u8; 15], #[serde_as(as = "Bytes")] #[serde(borrow)] cow_array: Cow<'a, [u8; 15]>,
Note: For borrowed arrays the used Deserializer needs to support Serde's 0-copy deserialization.