Skip to content

[RFC] Allow to cast an any pointer to a dynamic value #566

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marmeladema
Copy link
Contributor

This is just meant to start the discussion for #565, not be a full implementation yet.

The idea is to allow one to cast an any pointer to a dynamic value.
But in order to do that, the caller must provide the type of the value.
The part I am not so sure about is whether the function is safe to call, even if the type is wrong.

Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 50.64%. Comparing base (ab342b3) to head (ae11091).
Report is 157 commits behind head on master.

Files with missing lines Patch % Lines
capnp/src/any_pointer.rs 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #566      +/-   ##
==========================================
- Coverage   51.64%   50.64%   -1.00%     
==========================================
  Files          69       70       +1     
  Lines       33735    32239    -1496     
==========================================
- Hits        17422    16328    -1094     
+ Misses      16313    15911     -402     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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