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
There is no problem with the insertion. However, a query
let restaurants = collection.find(doc! {
"cuisine": cuisine,
})?;
where cuisine is a variant of Cuisine type
produces the following compiler error:
error[E0277]: the trait bound `Bson: From<Cuisine>` is not satisfied
the trait `From<Cuisine>` is not implemented for `Bson`
Is there a way to query by an Enum variant at all, or this is currently not possible without implementing Display trait for it, then converting it to a String?
The text was updated successfully, but these errors were encountered:
I am storing records and one of the fields is an
Enum
typeThere is no problem with the insertion. However, a query
where
cuisine
is a variant ofCuisine
typeproduces the following compiler error:
Is there a way to query by an
Enum
variant at all, or this is currently not possible without implementingDisplay
trait for it, then converting it to aString
?The text was updated successfully, but these errors were encountered: