Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-1306

Standardize on handling of options that are only relevant with certain features on

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.0.0
    • Affects Version/s: None
    • Component/s: None

      There are options we allow clients to configure that are only relevant when using certain features. We haven't been totally consistent in how we handle these.

      For example, we conditionally define the TlsOptions.allow_invalid_hostnames to only be available when using the openssl-tls feature.

      On the flipside, we unconditionally define ClientOptions.compressors and the Compressor type, but guard each individual case in Compressor behind its corresponding feature flag. This effectively prevents users from specifying the option when it won't actually be used since they cannot create an instance of Compressor, but may be confusing since the setter for compressors will always be available. It might be better to be more restrictive and only define the property when any of the compressor features are turned on.

      Prior to our 3.0 release it would be worth performing an audit of such options to make sure we take a consistent approach to defining them.

            Assignee:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: