Add constructor methods for ReadPreference

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Rust Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Constructing a read preference currently requires the following:

      let rp = ReadPreference::PrimaryPreferred { options: None };

      It would be nice to have constructor methods to simplify this, something like:

      let rp = ReadPreference::primary_preferred(None);
      let rp = ReadPreference::primary_preferred(options);

            Assignee:
            Unassigned
            Reporter:
            Isabel Atkinson
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: