You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that in 3.0.0 the .watch() method always returns a stream of ChangeStreamEvent<mongodb::bson::Document>? This seems unfortunate given that in 2.8.2 watch respected the T param of Collection.
Also, I don't see this change mentioned in the update notes.
let coll:Collection<bson::RawDocumentBuf> = ...;letmut stream = coll.watch().await?;// ERROR: cannot convert from `std::option::Option<ChangeStreamEvent<mongodb::bson::Document>>` to `std::option::Option<ChangeStreamEvent<RawDocumentBuf>>`let doc:Option<bson::RawDocumentBuf> = stream.next().await.transpose()?;
The text was updated successfully, but these errors were encountered:
abr-egn
changed the title
In 3.0.0, Collection::watch ignores the collection type parameter
RUST-1986 In 3.0.0, Collection::watch ignores the collection type parameter
Jul 3, 2024
It seems that in 3.0.0 the
.watch()
method always returns a stream ofChangeStreamEvent<mongodb::bson::Document>
? This seems unfortunate given that in 2.8.2 watch respected the T param of Collection.Also, I don't see this change mentioned in the update notes.
The text was updated successfully, but these errors were encountered: