feat: implement tuple trait impls and flatten field attribute#48
Open
stevencartavia wants to merge 4 commits into
Open
feat: implement tuple trait impls and flatten field attribute#48stevencartavia wants to merge 4 commits into
stevencartavia wants to merge 4 commits into
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019c6dfc-309f-72c9-97cf-732b4c6fb7fc Co-authored-by: Amp <amp@ampcode.com>
4 tasks
DaniPopes
reviewed
Feb 27, 2026
DaniPopes
reviewed
Feb 27, 2026
| @@ -190,7 +190,7 @@ pub enum PayloadView<'a> { | |||
| #[inline(always)] | |||
| fn get_next_byte(buf: &[u8]) -> Result<u8> { | |||
| if buf.is_empty() { | |||
Member
There was a problem hiding this comment.
these should likely become methods on deserializer that keeps track of the position and does like return Err(self.mk_error()) so that the position is propagated
Author
There was a problem hiding this comment.
Added decode_header, decode_bytes, and decode_str on Decoder with position-aware errors. Moving the parsing logic itself would require changing the RlpDecodable::rlp_decode signature from &mut &[u8] to &mut Decoder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14
Implements the remaining items from the new library and macro API:
RlpEncodable/RlpDecodableimpls for tuples (arity 1–12), encoding as RLP lists#[rlp(flatten)]field attribute usingrlp_encode_raw/rlp_decode_raw/rlp_len_raw#[rlp(flatten)]onOption<T>fieldsDecoder::byteposrlp_decode_raw