-
Notifications
You must be signed in to change notification settings - Fork 56
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
Should Source.buffer
be @UnsafeIoApi
instead of @InternalIoApi
?
#363
Comments
Or maybe we need a |
We definitely should! Now it clear that there's no other way to implement a custom extension reading/writing something from However, by making |
Yeah I very quickly ran into that case too, writing an |
I'm writing an inner-loop parser around a
Source
that does various look-ahead operations to determine delimiters for a sequence of bytes and then processes it. Since this delimiter always terminates a sequence, I know that all bytes are available withinSource.buffer
, and can useUnsafeBufferOperations
to more efficiently parse out the sequence members.Currently, however,
Source.buffer
is marked as "internal" rather than "unsafe" which (somewhat) prevents me from using it. The whole library is not stable yet, so for now I can rely on unsafe things, but I was curious if this was an oversight or if there was larger reasoning for it being unsafe.The text was updated successfully, but these errors were encountered: