Add the dependence of mybatis to Cargo.toml, I can't build project success, help me find the error please, thank you
I work on Windows system. rustc version : rustc 1.63.0
cmd error info:
error[E0599]: no variant or associated item named ObjectId found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\db\bind_pg.rs:119:15
|
119 | Bson::ObjectId(d) => {
| ^^^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named ObjectId found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\db\bind_pg.rs:238:27
|
238 | Bson::ObjectId(d) => {
| ^^^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named ObjectId found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\db\bind_mysql.rs:108:15
|
108 | Bson::ObjectId(d) => {
| ^^^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named ObjectId found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\db\bind_sqlite.rs:108:15
|
108 | Bson::ObjectId(d) => {
| ^^^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named ObjectId found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\db\bind_mssql.rs:105:15
|
105 | Bson::ObjectId(d) => {
| ^^^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named RegularExpression found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\types\mod.rs:92:19
|
92 | Bson::RegularExpression(j) => { format!("{:?}", j) }
| ^^^^^^^^^^^^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named JavaScriptCode found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\types\mod.rs:93:19
|
93 | Bson::JavaScriptCode(j) => { format!("{:?}", j) }
| ^^^^^^^^^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named JavaScriptCodeWithScope found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\types\mod.rs:94:19
|
94 | Bson::JavaScriptCodeWithScope(j) => { format!("{:?}", j) }
| ^^^^^^^^^^^^^^^^^^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named ObjectId found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\types\mod.rs:131:19
|
131 | Bson::ObjectId(id) => {
| ^^^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named Symbol found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\types\mod.rs:137:19
|
137 | Bson::Symbol(s) => { format!("{}", s) }
| ^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named Undefined found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\types\mod.rs:141:19
|
141 | Bson::Undefined => {
| ^^^^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named MaxKey found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\types\mod.rs:144:19
|
144 | Bson::MaxKey => { format!("{}", "MaxKey") }
| ^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named MinKey found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\types\mod.rs:145:19
|
145 | Bson::MinKey => { format!("{}", "MinKey") }
| ^^^^^^ variant or associated item not found in Bson
error[E0599]: no variant or associated item named DbPointer found for enum Bson in the current scope
--> C:\Users\admin.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2\mybatis-core-2.0.0\src\types\mod.rs:146:19
|
146 | Bson::DbPointer(p) => { format!("{:?}", p) }
| ^^^^^^^^^ variant or associated item not found in Bson
For more information about this error, try rustc --explain E0599.
error: could not compile mybatis-core due to 14 previous errors
Message that will be displayed on users first issue
Thank for reporting this error. At present, you can use version 2.0.4.
[dependencies]
mybatis = { version = "2.0.4", features = ["debug_mode"]}
serde = { version = "1", features = ["derive"] }
tokio = { version = "1.18.2", features = ["full"] }
At present, there are some problems with the mybatisplus macro. You can refer to the pet example.
Stale issue message