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

Add Borrowed Deserialization support (#1) #115

Closed
wants to merge 0 commits into from

Conversation

hamidrezakp
Copy link

Hello,
This PR will add a new trait called BorshBorrowedDeserialize which has explicit lifetime.
It's purpose is to efficiently and without allocating new memory, deserialize &[u8] and &str slices.

Changes:

  • Add support for str and u8 slice
  • Add derive macros for borrowed version of deserializer trait

It would be great if we can have this trait in the main crate.

@hamidrezakp
Copy link
Author

I noticed that derive macro needs better handling of life times and we can't use blanket impl.
Therefore have to write explicit impl for each type supported in other trait. will update this PR soon.

Just wanted to hear your feedback on this.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant