When a struct is passed in that doesn't implement binary interfaces, run recursive detection on each of its types with an automatic layout of sequential for each member of its data, that is by-definition in some stable order across struct member updates as long as the actual struct members remain. Likely dependant on all other type supporting and on #60
[x] make default values not be set for unset members
(removed sample impl as it's now in scm)
Tests:
[x] Create Enc tests in structs_test.go
[x] Create Dec tests in structs_test.go
[x] Test of struct within an array, Enc/Dec_Array_NoIndirection (arrays_test.go)
[x] Test of struct within an array, Enc/Dec_Array_ValueIndirection (arrays_test.go)
[x] Test of struct within a map, Enc/Dec_Map_NoIndirection (maps_test.go)
[x] Test of struct within a map, Enc/Dec_Map_ValueIndirection (maps_test.go)
[x] Test of struct within a slice, Enc/Dec_Slice_NoIndirection (slices_test.go)
[x] Test of struct within a slice, Enc/Dec_Slice_ValueIndirection (slices_test.go)
[x] Test of struct written with Writer, Test_Writer_Enc (streams_test.go)
[x] Test of struct read from sequence with Reader, Test_Reader_Dec_sequential (streams_test.go)
[x] Test of struct read with Reader, new test Test_Reader_Dec_struct (streams_test.go)
[x] Test of struct total offset errors, new test Test_reziError_totalOffset_struct (errors_test.go)
Be sure to update docs as well and note any limitations, such as:
only exported fields can be used
embedded fields must be of an exported type as a result of field name being taken from type
if receiving struct is passed in with fields that are not encoded in the REZI data, those fields are set to their default values; this includes unexported fields. (yeah, this needs to not do that bc otherwise shit gets ridiculous)
When a struct is passed in that doesn't implement
binary
interfaces, run recursive detection on each of its types with an automatic layout of sequential for each member of its data, that is by-definition in some stable order across struct member updates as long as the actual struct members remain. Likely dependant on all other type supporting and on #60(removed sample impl as it's now in scm)
Tests:
structs_test.go
structs_test.go
Enc
/Dec_Array_NoIndirection
(arrays_test.go)Enc
/Dec_Array_ValueIndirection
(arrays_test.go)Enc
/Dec_Map_NoIndirection
(maps_test.go)Enc
/Dec_Map_ValueIndirection
(maps_test.go)Enc
/Dec_Slice_NoIndirection
(slices_test.go)Enc
/Dec_Slice_ValueIndirection
(slices_test.go)Test_Writer_Enc
(streams_test.go)Test_Reader_Dec_sequential
(streams_test.go)Test_Reader_Dec_struct
(streams_test.go)Test_reziError_totalOffset_struct
(errors_test.go)Be sure to update docs as well and note any limitations, such as:
if receiving struct is passed in with fields that are not encoded in the REZI data, those fields are set to their default values; this includes unexported fields.(yeah, this needs to not do that bc otherwise shit gets ridiculous)