pub trait BigArray<'de, T>: Sized {
    // Required methods
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
       where S: Serializer,
             T: Serialize;
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
       where D: Deserializer<'de>,
             T: Deserialize<'de>;
}
Expand description

The big array serialization helper trait

#[derive(Serialize, Deserialize)]
struct S {
    #[serde(with = "BigArray")]
    arr: [u8; 64],
}

Required Methods§

source

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer, T: Serialize,

source

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>, T: Deserialize<'de>,

Implementations on Foreign Types§

source§

impl<'de, T, const N: usize> BigArray<'de, T> for [T; N]

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer, T: Serialize,

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>, T: Deserialize<'de>,

Implementors§