Skip to content
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

Add TransparentWrapper marker trait #15

Merged
merged 3 commits into from
Jan 29, 2020
Merged

Conversation

thomcc
Copy link
Contributor

@thomcc thomcc commented Jan 10, 2020

That transmute_copy bothers me, and I'd like have a "do sizes match" sanity check for broken impls... But supporting &[T] to &SomeStruct([T]) is too useful to give up IMO.

Unsure on where wrap_ref/wrap_mut should go. I don't really like "hey don't implement this" functions on the trait, but maybe they'd be better there.

@thomcc thomcc force-pushed the transparent branch 2 times, most recently from 8794b94 to 7cca499 Compare January 10, 2020 20:28
@thomcc
Copy link
Contributor Author

thomcc commented Jan 11, 2020

The last commit here arguably should be another PR, but I think I'm the one who wrote the doctests anyway, so whatever.

@Lokathor Lokathor merged commit 6feac18 into Lokathor:master Jan 29, 2020
@thomcc thomcc deleted the transparent branch January 30, 2020 07:43
leod pushed a commit to leod/bytemuck that referenced this pull request Jun 3, 2023
Add TransparentWrapper marker trait
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.

2 participants