zerocopy icon indicating copy to clipboard operation
zerocopy copied to clipboard

[pointer][transmute] Support generic TransmuteFrom

Open joshlf opened this issue 1 year ago • 1 comments

This commit replaces the TransparentWrapper trait with a more generic, bidirectional TransmuteFrom<T> trait. U: TransmuteFrom<T> indicates that T and U have the same sizes and that T can be transmuted into U given certain alignment and validity invariant mappings.

Makes progress on #1122


This PR is on branch ptr-overhaul.

  • #1913
  • #1910
  • #1942
  • #1911

joshlf avatar Oct 15 '24 02:10 joshlf

Codecov Report

Attention: Patch coverage is 56.79012% with 35 lines in your changes missing coverage. Please review.

Please upload report for BASE (I1ac2ae177a235083e33b09fc848423220d3da042@4795dcd). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/pointer/transmute.rs 32.65% 33 Missing :warning:
src/util/macros.rs 33.33% 2 Missing :warning:
Additional details and impacted files
@@                             Coverage Diff                              @@
##             I1ac2ae177a235083e33b09fc848423220d3da042    #1910   +/-   ##
============================================================================
  Coverage                                             ?   89.76%           
============================================================================
  Files                                                ?       17           
  Lines                                                ?     5806           
  Branches                                             ?        0           
============================================================================
  Hits                                                 ?     5212           
  Misses                                               ?      594           
  Partials                                             ?        0           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 18 '24 17:10 codecov-commenter