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 a safe way to fill a ReadBuf #3515

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

notgull
Copy link

@notgull notgull commented Jan 5, 2024

Closes #3509

Signed-off-by: John Nunley <[email protected]>
@seanmonstar
Copy link
Member

Thanks for the PR!

My initial thoughts were that we could provide a couple methods like in BorrowedCursor. Looking through them, it occurs to me that the only "basic" safe way to write data is to like append(&[u8]). Otherwise, even if you can safely access all initialized_mut(), it would still be unsafe to state an arbitrary number of bytes have been written.

@seanmonstar seanmonstar added the S-waiting-on-author Status: waiting on the author to provide more info, or make changes. label Jan 31, 2024
@notgull
Copy link
Author

notgull commented May 30, 2024

My initial thoughts were that we could provide a couple methods like in BorrowedCursor.

Any specific methods?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: waiting on the author to provide more info, or make changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to safely read into ReadBuf
2 participants