skip to Main Content

Unable to use u128 datatype via MongoDB Rust driver: BsonSerialization(SerializationError { message: "u128 is not supported" })

I need help using Rust's u128 data type via MongoDB's Rust driver. Please find my minimal example below: use mongodb::{bson::{doc}, options::{ClientOptions, ServerApi, ServerApiVersion}, Client}; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] struct Book { id : u128, title : String, author:…

VIEW QUESTION

Mongodb – how to access object inside the array?

{ "_id" : ObjectId("64caa6599b2ec8d2da9e8e58"), "message" : { "text" : "hey" }, "users" : [ { "from" : "64c7acfbe872c97c7912ca09", "to" : "64c2d5612172d620ac18714f" } ], "sender" : ObjectId("64c7acfbe872c97c7912ca09"), "createdAt" : ISODate("2023-08-02T18:54:17.176+0000"), "updatedAt" : ISODate("2023-08-02T18:54:17.176+0000"), "__v" : NumberInt(0) } I want to access…

VIEW QUESTION
Back To Top
Search