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

Git Hub examples do not work?

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      I'm trying to connect to an Atlas Cloud using the MongoDB Rust Driver, and I'm having no success at all.

      1) If I use a project with Rocket Web Framework, adding MongoDB creates a Ring Dependency issue, that I just can't get over.

      2) If I start a new project rustup update to 1.43 the async functions complain:

      let client = Client::with_options(client_options)?;

      ^^^^^^^^^^^^^^ expected struct `mongodb::client::options::ClientOptions`, found opaque type

      3) the sync version can't find a database function:

      let mut client = Client::with_uri_str("mongodb+srv://User:Password@usavital01.hg9ih.azure.mongodb.net/slam");
      let database = client.database("slam");

      ^^^^^^^^ method not found in `std::result::Result<mongodb::sync::client::Client, mongodb::error::Error>

      let collection = database.collection("books");

       

       

            Assignee:
            sam.rossi@mongodb.com Samuel Rossi (Inactive)
            Reporter:
            abuss@authoricheck.com Ashley Buss
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: