Skip to content

feature: compute encoded size statically where possible #105

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

Merged
merged 14 commits into from
Jun 13, 2023

Conversation

prestwich
Copy link
Member

Motivation

for most types, encoded size is known at compile time.

Solution

add pub ENCODED_SIZE: Option<usize>
add fn encoded_size<B>(rust: B) for run-time calculation

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@prestwich prestwich added the enhancement New feature or request label Jun 12, 2023
@prestwich prestwich requested a review from DaniPopes June 12, 2023 21:12
@prestwich prestwich self-assigned this Jun 12, 2023
@prestwich
Copy link
Member Author

CI failures due to some sort of docker issue

@prestwich prestwich force-pushed the prestwich/encoded-size branch from 655779e to 5351591 Compare June 12, 2023 23:06
@prestwich prestwich enabled auto-merge (squash) June 13, 2023 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants