Closed amosjyng closed 1 day ago
I can't do this
use asciicast::{Entry, Header}; #[derive(specta::Type)] pub struct AsciiCastData { pub header: Header, pub entries: Vec<Entry>, }
because
the trait bound `Header: specta::Type` is not satisfied
But neither can I manually implement it
use specta::datatype::{DataType, StructType}; impl specta::Type for AsciiCastData { fn inline(type_map: &mut specta::TypeMap, generics: specta::Generics) -> DataType { DataType::Struct( StructType { name: "AsciiCastData".to_string(), sid: None, fields: vec![ ... ], generics: vec![], } ) } }
because those fields are private to the crate.
Do you have any recommendations?
fyi: this was discussed in #284. Also, see this for a more detailed answer.
Oh nice! Somehow I didn't find those issues when I did a search. Thanks!
I can't do this
because
But neither can I manually implement it
because those fields are private to the crate.
Do you have any recommendations?