pub trait Serializable<T: Serialize, const N: usize> {
// Required method
fn serialize<S>(&self, ser: S) -> Result<S::Ok, S::Error>
where S: Serializer;
}Expand description
Trait for types serializable using serde_arrays
In order to serialize data using this crate, the type needs to implement this trait. While this approach has limitations in what can be supported (namely it limits support to only those types this trait is explicitly implemented on), the trade off is a significant increase in ergonomics.
If the greater flexibility lost by this approach is needed, see serde_with.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.