Closed mcginty closed 2 months ago
You can create the same type as
Client<client_builder::private::Config<SqLiteKeyPackageStorage, SqLitePreSharedKeyStorage, SqLiteGroupStateStorage, BasicIdentityProvider, DefaultMlsRules, OpensslCryptoProvider>>
using
Client<WithIdentityProvider<BasicIdentityProvider, WithCryptoProvider<OpensslCryptoProvider, BaseSqlConfig>>>
Would this help? Basically WithIdentityProvider<X, Config>
overwrites anything Config
has for the identity provider with X
I've been playing around with
mls-rs
, and as my code gets more complex, I tend to find it helpful to write higher-level wrappers around a lower level API likeClient
offers.This pattern with the current accessibility of the internal
Config
types seems to complicate this as you use a builder that ends up straying from the publicly exposedBaseSqlConfig
, for example.Example problem that shows the private type that I can't specify in a struct definition:
Is there a recommended way to accomplish this with the current API and/or would you consider making the
Config
trait public to allow this pattern to be used?