-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Some data types surprisingly works, and some data types unsurprisingly doesn't work
using StructIO
using EnumX
using StaticArrays
# Some data types that surprisingly works
@enumx RetCode::Int8 begin
NO_ERROR
INVALID_ERROR
HELLO_WORLD
STREIBOUGH
end
@io struct Reply
rc::RetCode.T
result::Int
end align_packed #StructIO works with EnumX enums
@io struct Nested
msgid::UInt8
msg::Reply
end align_packed #StructIO can successfully deserialize nested structs
@io struct Fixed
num::Int
vec::SVector{16,UInt8}
end align_packed #StructIO works with StaticArrays
#Some data types that doesn't work
@io struct Cursed
st::String
num::Int
end align_packed # Unsurprisingly doesn't work as string is a variable length array
@io struct Trailing
num::Int
vec::Vector{UInt8}
end align_packed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels