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

Efficient API to access chunk at given offset #15

Open
flyingmutant opened this issue Jan 2, 2024 · 1 comment
Open

Efficient API to access chunk at given offset #15

flyingmutant opened this issue Jan 2, 2024 · 1 comment

Comments

@flyingmutant
Copy link
Contributor

For use-cases like logos::Source, efficient access to raw bytes can be important. Would you be OK with adding a method like ropey::RopeSlice::chunk_at_byte? Not a feature request, just want to know your stance on expanding API in this direction.

@linrongbin16
Copy link

linrongbin16 commented Aug 21, 2024

hi @flyingmutant , is it possible to use the logos::Source with lines or bytes related APIs from this crate? Or it's a must to use chunk related APIs to do it?

(Actually I'm comparing this crate with Ropey, and want to understand in what scenario we must use the chunk related APIs)


Update:

@flyingmutant , I found in the latest version of this crate, it already support chunk related APIs: https://docs.rs/crop/latest/crop/iter/struct.Chunks.html.

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

No branches or pull requests

2 participants