You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen some examples of using serde_as for explicitly-defined size ranges, but I'm struggling to figure out how to apply to const generics, if it's even possible.
use serde::{Serialize,Deserialize};use serde_with::serde_as;#[serde_as]#[derive(Copy,Clone,PartialEq,Eq,Serialize,Deserialize)]structFixedMatrix<T,constROW:usize,constCOL:usize>{
serde_as(as = "[[_; ROW]; COL]")
data:[[T;ROW];COL],}
I've seen some examples of using
serde_as
for explicitly-defined size ranges, but I'm struggling to figure out how to apply to const generics, if it's even possible.Was browsing through serde-rs/serde#1937 and saw mention of:
The text was updated successfully, but these errors were encountered: