basic-types-numbers-{1-11}
basic-types-char-bool-unit-{1-6}
basic-types-statements-expressions-{0-3}
basic-types-functions-{1-5}
ownership-ownership-{1-9}
ownership-borrowing-{1-11}
compound-types-string-{1-12}
compound-types-array-{1-6}
compound-types-slice-{1-6}
compound-types-tuple-{1-6}
compound-types-struct-{1-8}
compound-types-enum-{1-6}
flow-control-{1-11}
pattern-match-match-iflet-{1-9}
pattern-match-patterns-{1-6}
method-{1-6}
generics-traits-generics-{1-7}
generics-traits-const-generics-{1-3}
generics-traits-traits-{1-9}
generics-traits-trait-object-{1-5}
generics-traits-advanced-traits-{1-5}
collections-String-{1-7}
collections-vector-{1-8}
collections-hashmap-{1-5}
type-conversions-as-{1-5}
type-conversions-from-into-{1-5}
type-conversions-others-{1-5}
result-panic-panic-{1-2}
result-panic-result-{1-6}
crate-module-crate-{1-6}
cargo new hello-package
cargo new --lib hello-package1
- 包名不同,包根位置不同,分别是
hello-package
,hello-package1
和src/main.rs
,src/lib.rs
hello-package1
# FILL in the blanks . ├── Cargo.lock ├── Cargo.toml ├── src │ ├── main.rs │ └── lib.rs
# Create a package which contains # 1. three binary crates: `hello-package`, `main1` and `main2` # 2. one library crate # describe the directory tree below . ├── Cargo.toml ├── Cargo.lock ├── src │ ├── main.rs │ ├── lib.rs │ └── bin │ └── main1.rs │ └── main2.rs ├── tests # directory for integrated tests files │ └── some_integration_tests.rs ├── benches # dir for benchmark files │ └── simple_bench.rs └── examples # dir for example files └── simple_example.rs
crate-module-module-{1-5}
1-5: practice/crate-module/hello-packagecrate-module-use-pub-{1-3}
comments-docs-{1-4}
formatted-output-{1-9}
lifetime-basic-{1-10}
lifetime-static-{1-6}
lifetime-advance-{1-6}