twoway icon indicating copy to clipboard operation
twoway copied to clipboard

Expose TwoWaySearcher in API

Open sgodwincs opened this issue 6 years ago • 3 comments

I'm creating a type that implements Searcher for an uncommon string encoding and I would like to use this crate to do so. Unfortunately, the current API doesn't expose enough of TwoWaySearcher to do this and using the provided functions requires initializing the TwoWaySearcher on every match. Would you be open to making it more available?

sgodwincs avatar Sep 20 '19 03:09 sgodwincs

sure

bluss avatar Sep 20 '19 06:09 bluss

I guess that would also expose it's API documentation in doc.rs, which is a very nice written documentation and it would be tremendously helpful for people learning about the algorithm. I am talking specifically about this documentation https://docs.rs/twoway/0.2.1/src/twoway/lib.rs.html#375 So, even if the TwoWaySearcher is not exposed, somehow exposing it's documentation in the doc.rs is still worth it IMO.

UgurcanAkkok avatar Jan 16 '21 08:01 UgurcanAkkok

That's a nice idea. I think that text is also in std code somewhere. (I'm author to some updates of the code in std, but many worked on it. With this said, I haven't seen if there has been any updates to the core algorithm the last years, probably not much.)

bluss avatar Jan 16 '21 11:01 bluss