You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While reviewing a PR like this one, I noticed a common pattern where users struggle to work with our write_with API. This API is designed for more advanced Rust users, but it can be quite difficult to use when users try to wrap it.
So, I'm wondering if it would be a good idea to expose OpXxx directly, allowing users to use them more straightforwardly, like this:
let opt = OpWrite::default();let _ = op.write_opt(path, data, opt).await?;
Following the same pattern, we could introduce read_opt, list_opt, and more.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, everyone,
While reviewing a PR like this one, I noticed a common pattern where users struggle to work with our
write_with
API. This API is designed for more advanced Rust users, but it can be quite difficult to use when users try to wrap it.So, I'm wondering if it would be a good idea to expose
OpXxx
directly, allowing users to use them more straightforwardly, like this:Following the same pattern, we could introduce
read_opt
,list_opt
, and more.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions