Function solana_sdk::short_vec::serialize [−][src]
pub fn serialize<S, T>(
elements: &[T],
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
T: Serialize,
S: Serializer,
If you don’t want to use the ShortVec newtype, you can do ShortVec serialization on an ordinary vector with the following field annotation:
#[serde(with = “short_vec”)]