Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ingress socket data through borrowed buffer #14

Open
MathiasKoch opened this issue Apr 30, 2020 · 0 comments
Open

Ingress socket data through borrowed buffer #14

MathiasKoch opened this issue Apr 30, 2020 · 0 comments
Labels
enhancement 👍 New feature or request priority: high As soon as capacity allows it, this is the focus

Comments

@MathiasKoch
Copy link
Member

MathiasKoch commented Apr 30, 2020

Currently the socket data ingress works as

atat::Buf -> serde_json::parse -> SocketData -> hex::decode -> Tcp::RxBuf
          ^                    ^             ^              ^
        clone                clone         inline         clone

Using serde's zero-copy deserializing (https://serde.rs/lifetimes.html), it should be possible to refactor this into:

atat::Buf -> serde_json::parse -> SocketData -> Tcp::RxBuf
          ^                    ^             ^
        clone                borrow        borrow

Where the two borrow's symbolise the borrowed Tcp::RxBuf

This feature is not currently supported by neither serde_at, nor atat_derive, and might not need to be supported by atat_derive at all.

@MathiasKoch MathiasKoch added enhancement 👍 New feature or request priority: high As soon as capacity allows it, this is the focus labels Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 👍 New feature or request priority: high As soon as capacity allows it, this is the focus
Projects
None yet
Development

No branches or pull requests

1 participant