silver-ymz commented on PR #3004: URL: https://github.com/apache/incubator-opendal/pull/3004#issuecomment-1704795422
> It does ok to expose as just fill_buf, but: > > Users should not call fill_buf as first, it's not the public API we want to expose. (are you agree with this?) fill_buf is confused with other APIs. I prefer to have something that opendal::ffi::reader_fill_buf, and our cpp code should call opendal::ffi::reader_fill_buf internally. (note, there are two layers here, we should not expose ffi to users directly) We don't expose `fill_buf` as public API. our public headers don't inlcude `lib.rs.h`. So idealy, user won't see or use anything in `opendal::ffi` namesapce inlucing all functions of `Reader`. If users try using it according to some magic ways, we don't have any ways to avoid it. Although we show the definition of `Reader` in `opendal.hpp`, our users can't get a `Reader` by any normal ways. What user will use is `ReaderStream`, all functions about it are same with [`std::istream`](https://en.cppreference.com/w/cpp/io/basic_istream). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
