An into_bytes function, which just called as_bytes, was decided as not
being needed because it would require that the Transmutable trait have
the requirement of being Sized. This may not be desirable in the future,
so for now there is no into_bytes. It can easily be added later with
a change to 9 lines of code.
This was changed to make everything easier to use. The mutable buffers
were not working well for combined types. It was move to a growable array
to make these more advanced combined types, other structures, easier to
implement.
There is now a ByteSized trait that can be used to specify how many
bytes it takes to represent a piece of data. This has been implemented
for all of the primitive number types. With this information Transmutable
was able to create a Vector2 wrapper that will need to be tested. If it
works then soon after Vectors and other Sigils types can be turned into
Transmutable types.
This also has the changes for the original tests and example
to use the new ByteSized information.
There is now a random test for all the primitive number types.
Also, I fixed my errors with the tests that should panic. I kept thinking
that they should run fine and it was throwing off how I was writing
the code.
This tests buffer overflow for the basic types. It does not currently
test the platform int and uint until the final function definitions
are determined.
Numbers can be converted to and from bytes in both
BigEndian and LittleEndian styles. This does not yet take care of
the other mathematical structures provided by Sigil.
Also, no tests of these capabilities have been written yet.