I'm the maintainer of https://github.com/hwchen/keyring-rs, which provides a linux/windows/macos interface to respective system vaults. I wrote this when I was pretty young at Rust, I simply made three different modules which exported identical public interfaces to structs and methods.
Now, there's finally been a request for a platform-specific (access to a specified Keychain on mac).
My question is whether it's worth it now to enforce the interface through a trait, and allow platform-specific features through an extension trait.
I guess the other options would be to just allow one-off functionality and document well, or see if I can find a more generic cross-platform method that would include the functionality of setting a keychain.
I'm leaning towards just allowing the one-off functionality because it's simple and doesn't introduce a breaking change. But I don't want to be setting myself up for heartbreak down the road. Any feedback is greatly appreciated.