Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Element serialisation #25

Open
1 task
dhardy opened this issue Feb 23, 2016 · 1 comment
Open
1 task

Element serialisation #25

dhardy opened this issue Feb 23, 2016 · 1 comment

Comments

@dhardy
Copy link
Owner

dhardy commented Feb 23, 2016

Currently read and write operations in traits require an extra level of
buffering. Alternative methods for direct reading/writing could be required,
but this has some caveats: the writer must know in advance exactly how much
data will be written and must read exactly the amount of data given, failing if
data cannot be read.

A compromise would be to allow the user to choose which to implement. But this
would require a switch describing which methods should be used, which is where
associated constants come in (Rust issue #29646).

Traits this is applicable to:

Element in element.rs
  • Code tag #0025
@dhardy
Copy link
Owner Author

dhardy commented Jun 3, 2017

Alternative: use Serde for element (de)serialisation.

Element trait would then be a bunch of super-trait requirements plus a sum default/optimised function.

@dhardy dhardy changed the title Flexible IO options Element serialisation Jun 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant