Skip to content

Use builder pattern for ApcbIoOptions #115

Closed
@daym

Description

@daym

Right now, ApcbIoOptions can only be constructed via ApcbIoOptions::default().

It would be nice to allow the user to build any options using the usual Rust builder pattern.

https://rust-unofficial.github.io/patterns/patterns/creational/builder.html

The reason why this is done using functions instead of struct fields:

  1. So we can, in the future, add options (with defaults) without all call sites having to adapt.
  2. So we can have compatibility shims for the deprecated options if we ever decide to change what the options are.

Metadata

Metadata

Assignees

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