Skip to content

Add new API like write_opt to allow users to pass an OpWrite directly #5727

@Xuanwo

Description

@Xuanwo

Discussed in #5674

Originally posted by Xuanwo March 1, 2025
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:

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.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions