You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to derive both RlpDecodable and RlpEncodable for a struct that has a field that needs to be omitted, it requires both the #[rlp(default)] (for decoding) and #[rlp(skip) (for encoding) attributes.
However, if you combine these two values into a single field annotation, the procedural macro is no longer able to detect the attributes correctly and raises an error. For example:
If you want to derive both
RlpDecodable
andRlpEncodable
for a struct that has a field that needs to be omitted, it requires both the#[rlp(default)]
(for decoding) and#[rlp(skip)
(for encoding) attributes.However, if you combine these two values into a single field annotation, the procedural macro is no longer able to detect the attributes correctly and raises an error. For example:
raises the compiler error
the trait bound
std::sync::OnceLock: access_list::_::alloy_rlp::Decodableis not satisfied
.Instead writing:
does compile successfully.
The text was updated successfully, but these errors were encountered: