January 2019
Intermediate to advanced
520 pages
14h 32m
English
Let's test our tool. Compile and run it with the following commands:
cargo run -- add user1 user1@example.comcargo run -- add user2 user2@example.comcargo run -- add userx userx@xample.com
If you add filtering and call the list subcommand, you will see the following output:
cargo run -- listUser { id: "a9ec3bae-c8c6-4580-97e1-db8f988f10f8", name: "user1", email: "user1@example.com" }User { id: "7f710d18-aea5-46f9-913c-b60d4e4529c9", name: "user2", email: "user2@example.com" }
We got a perfect example of mapping pure Rust types to relational database types.
Read now
Unlock full access