├── .gitattributes ├── .gitignore ├── Chapter02 ├── addstring-1 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── addstring-2 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── formataddstring │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── matrix │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── pass_by_value │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── push-pushstr │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs └── vectors │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── main.rs ├── Chapter03 ├── args │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs └── readline │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── main.rs ├── Chapter04 ├── arrayloop │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── dataloop │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── enumerate │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── looplabels-2 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── looplabels-3 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── looplabels │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── recurse-1 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── semicolon_block │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── terminate-loop-1 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs └── terminate-loop-2 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── main.rs ├── Chapter05 ├── rc-1 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── refs-1 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── threads-1 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs └── threads-2 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── main.rs ├── Chapter07 ├── enumscope │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── multifile │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ ├── main.rs │ │ └── structs.rs ├── newtype │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── readwrite │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ ├── main.rs │ │ └── readwrite.rs └── simplestruct │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── main.rs ├── Chapter08 ├── borrowing │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── copyf32 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── copyint │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── function_outofscope │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── handback │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── invaliditerator │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── invalidlifetime │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── lifetimescope │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── mutableref1 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── mutableref2 │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs └── outofscope │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── main.rs ├── Chapter09 ├── dynamic_dispatch │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── generic_multiply_return_t │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── generic_trait_full │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── generic_trait_where │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── generic_traits_simple │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── generic_typeof │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── generic_typeof_print │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── impl_example │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── inheritance │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── multiply_generic_return_t │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── non_generic_trait │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── override_default_method │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── trait_bound_gen_struct │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs └── trait_object_static │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── main.rs ├── Chapter10 ├── MathsLib │ ├── Cargo.lock │ ├── Cargo.toml │ ├── src │ │ ├── bases │ │ │ ├── base_to_base.rs │ │ │ ├── from_base10.rs │ │ │ ├── mod.rs │ │ │ └── to_base10.rs │ │ ├── conversions │ │ │ ├── distance.rs │ │ │ ├── mod.rs │ │ │ ├── pressure.rs │ │ │ ├── temperature.rs │ │ │ └── volume.rs │ │ ├── lib.rs │ │ ├── regression_analysis │ │ │ ├── intercepts.rs │ │ │ ├── mod.rs │ │ │ └── statistics.rs │ │ └── trigonometry │ │ │ ├── arc.rs │ │ │ ├── mod.rs │ │ │ └── natural.rs │ └── tests │ │ ├── base_tests │ │ └── mod.rs │ │ ├── conversion_tests │ │ ├── mod.rs │ │ └── temperature_tests.rs │ │ ├── lib.rs │ │ ├── regression_analysis_tests │ │ └── mod.rs │ │ └── trigonometry_tests │ │ └── mod.rs ├── MathsLibMultiFile │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ ├── Bases.rs │ │ ├── Conversions.rs │ │ ├── RegressionAnalysis.rs │ │ ├── Trigonometry.rs │ │ └── lib.rs ├── MathsLibMultiFileDirs │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ ├── Bases │ │ ├── BaseToBase.rs │ │ ├── FromBase10.rs │ │ ├── ToBase10.rs │ │ └── mod.rs │ │ ├── Conversions │ │ ├── Distance.rs │ │ ├── Pressure.rs │ │ ├── Temperature.rs │ │ ├── Volume.rs │ │ └── mod.rs │ │ ├── RegressionAnalysis │ │ ├── Intercepts.rs │ │ ├── Statistics.rs │ │ └── mod.rs │ │ ├── Trigonometry │ │ ├── Arc.rs │ │ ├── Natural.rs │ │ └── mod.rs │ │ └── lib.rs ├── MathsLibStructure │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── QuickTest │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs └── first_run_out │ ├── 1.txt │ ├── Cargo.lock │ ├── Cargo.toml │ ├── libmathslib.rlib │ ├── mathslib.0.bytecode.deflate │ ├── mathslib.0.o │ ├── rust.metadata.bin │ └── src │ └── main.rs ├── Chapter11 ├── SimpleThreadExample │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ └── main.rs ├── channels │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── close_fn_args │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── close_mut_error │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── closures │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── joined_thread │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── move_closure_one │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── mutex │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── return_closure_one │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs └── return_closure_three │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── main.rs ├── LICENSE └── README.md /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/.gitattributes -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/.gitignore -------------------------------------------------------------------------------- /Chapter02/addstring-1/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "addstring-1" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter02/addstring-1/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "addstring-1" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter02/addstring-1/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter02/addstring-1/src/main.rs -------------------------------------------------------------------------------- /Chapter02/addstring-2/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "addstring-2" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter02/addstring-2/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "addstring-2" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter02/addstring-2/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter02/addstring-2/src/main.rs -------------------------------------------------------------------------------- /Chapter02/formataddstring/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "formataddstring" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter02/formataddstring/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "formataddstring" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter02/formataddstring/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter02/formataddstring/src/main.rs -------------------------------------------------------------------------------- /Chapter02/matrix/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "matrix" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter02/matrix/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "matrix" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter02/matrix/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter02/matrix/src/main.rs -------------------------------------------------------------------------------- /Chapter02/pass_by_value/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "pass_by_value" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter02/pass_by_value/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "pass_by_value" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter02/pass_by_value/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter02/pass_by_value/src/main.rs -------------------------------------------------------------------------------- /Chapter02/push-pushstr/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter02/push-pushstr/Cargo.lock -------------------------------------------------------------------------------- /Chapter02/push-pushstr/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter02/push-pushstr/Cargo.toml -------------------------------------------------------------------------------- /Chapter02/push-pushstr/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter02/push-pushstr/src/main.rs -------------------------------------------------------------------------------- /Chapter02/vectors/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "vectors" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter02/vectors/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vectors" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter02/vectors/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter02/vectors/src/main.rs -------------------------------------------------------------------------------- /Chapter03/args/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "args" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter03/args/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "args" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter03/args/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter03/args/src/main.rs -------------------------------------------------------------------------------- /Chapter03/readline/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "readline" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter03/readline/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "readline" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter03/readline/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter03/readline/src/main.rs -------------------------------------------------------------------------------- /Chapter04/arrayloop/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "arrayloop" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/arrayloop/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "arrayloop" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter04/arrayloop/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter04/arrayloop/src/main.rs -------------------------------------------------------------------------------- /Chapter04/dataloop/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "dataloop" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/dataloop/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dataloop" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter04/dataloop/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter04/dataloop/src/main.rs -------------------------------------------------------------------------------- /Chapter04/enumerate/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "enumerate" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/enumerate/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "enumerate" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter04/enumerate/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter04/enumerate/src/main.rs -------------------------------------------------------------------------------- /Chapter04/looplabels-2/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "looplabels-2" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/looplabels-2/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "looplabels-2" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter04/looplabels-2/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter04/looplabels-2/src/main.rs -------------------------------------------------------------------------------- /Chapter04/looplabels-3/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "looplabels-3" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/looplabels-3/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "looplabels-3" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter04/looplabels-3/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter04/looplabels-3/src/main.rs -------------------------------------------------------------------------------- /Chapter04/looplabels/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "looplabels" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/looplabels/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "looplabels" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter04/looplabels/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter04/looplabels/src/main.rs -------------------------------------------------------------------------------- /Chapter04/recurse-1/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "recurse-1" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/recurse-1/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "recurse-1" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter04/recurse-1/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter04/recurse-1/src/main.rs -------------------------------------------------------------------------------- /Chapter04/semicolon_block/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "semicolon_block" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/semicolon_block/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "semicolon_block" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter04/semicolon_block/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter04/semicolon_block/src/main.rs -------------------------------------------------------------------------------- /Chapter04/terminate-loop-1/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "terminate-loop-1" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/terminate-loop-1/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "terminate-loop-1" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter04/terminate-loop-1/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter04/terminate-loop-1/src/main.rs -------------------------------------------------------------------------------- /Chapter04/terminate-loop-2/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "terminate-loop-2" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/terminate-loop-2/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "terminate-loop-2" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter04/terminate-loop-2/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter04/terminate-loop-2/src/main.rs -------------------------------------------------------------------------------- /Chapter05/rc-1/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "rc-1" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter05/rc-1/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rc-1" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter05/rc-1/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter05/rc-1/src/main.rs -------------------------------------------------------------------------------- /Chapter05/refs-1/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "refs-1" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter05/refs-1/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "refs-1" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter05/refs-1/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter05/refs-1/src/main.rs -------------------------------------------------------------------------------- /Chapter05/threads-1/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "threads-1" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter05/threads-1/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "threads-1" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter05/threads-1/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter05/threads-1/src/main.rs -------------------------------------------------------------------------------- /Chapter05/threads-2/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "threads-2" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter05/threads-2/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "threads-2" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter05/threads-2/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter05/threads-2/src/main.rs -------------------------------------------------------------------------------- /Chapter07/enumscope/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "enumscope" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter07/enumscope/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "enumscope" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter07/enumscope/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter07/enumscope/src/main.rs -------------------------------------------------------------------------------- /Chapter07/multifile/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "multifile" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter07/multifile/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "multifile" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter07/multifile/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter07/multifile/src/main.rs -------------------------------------------------------------------------------- /Chapter07/multifile/src/structs.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter07/multifile/src/structs.rs -------------------------------------------------------------------------------- /Chapter07/newtype/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "newtype" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter07/newtype/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "newtype" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter07/newtype/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter07/newtype/src/main.rs -------------------------------------------------------------------------------- /Chapter07/readwrite/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "readwrite" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter07/readwrite/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "readwrite" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter07/readwrite/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter07/readwrite/src/main.rs -------------------------------------------------------------------------------- /Chapter07/readwrite/src/readwrite.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter07/readwrite/src/readwrite.rs -------------------------------------------------------------------------------- /Chapter07/simplestruct/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "simplestruct" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter07/simplestruct/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "simplestruct" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter07/simplestruct/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter07/simplestruct/src/main.rs -------------------------------------------------------------------------------- /Chapter08/borrowing/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "borrowing" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter08/borrowing/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/borrowing/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/borrowing/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/borrowing/src/main.rs -------------------------------------------------------------------------------- /Chapter08/copyf32/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "copyf32" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter08/copyf32/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/copyf32/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/copyf32/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/copyf32/src/main.rs -------------------------------------------------------------------------------- /Chapter08/copyint/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "copyint" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter08/copyint/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/copyint/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/copyint/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/copyint/src/main.rs -------------------------------------------------------------------------------- /Chapter08/function_outofscope/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/function_outofscope/Cargo.lock -------------------------------------------------------------------------------- /Chapter08/function_outofscope/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/function_outofscope/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/function_outofscope/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/function_outofscope/src/main.rs -------------------------------------------------------------------------------- /Chapter08/handback/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "handback" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter08/handback/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/handback/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/handback/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/handback/src/main.rs -------------------------------------------------------------------------------- /Chapter08/invaliditerator/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "invaliditerator" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter08/invaliditerator/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/invaliditerator/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/invaliditerator/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/invaliditerator/src/main.rs -------------------------------------------------------------------------------- /Chapter08/invalidlifetime/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "invalidlifetime" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter08/invalidlifetime/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/invalidlifetime/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/invalidlifetime/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/invalidlifetime/src/main.rs -------------------------------------------------------------------------------- /Chapter08/lifetimescope/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "lifetimescope" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter08/lifetimescope/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/lifetimescope/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/lifetimescope/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/lifetimescope/src/main.rs -------------------------------------------------------------------------------- /Chapter08/mutableref1/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "mutableref2" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter08/mutableref1/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/mutableref1/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/mutableref1/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/mutableref1/src/main.rs -------------------------------------------------------------------------------- /Chapter08/mutableref2/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "mutableref1" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter08/mutableref2/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/mutableref2/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/mutableref2/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/mutableref2/src/main.rs -------------------------------------------------------------------------------- /Chapter08/outofscope/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "outofscope" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter08/outofscope/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/outofscope/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/outofscope/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter08/outofscope/src/main.rs -------------------------------------------------------------------------------- /Chapter09/dynamic_dispatch/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/dynamic_dispatch/Cargo.lock -------------------------------------------------------------------------------- /Chapter09/dynamic_dispatch/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/dynamic_dispatch/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/dynamic_dispatch/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/dynamic_dispatch/src/main.rs -------------------------------------------------------------------------------- /Chapter09/generic_multiply_return_t/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "generic_multiply_return_t" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/generic_multiply_return_t/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/generic_multiply_return_t/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/generic_multiply_return_t/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/generic_multiply_return_t/src/main.rs -------------------------------------------------------------------------------- /Chapter09/generic_trait_full/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "generic_trait_full" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/generic_trait_full/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "generic_trait_full" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter09/generic_trait_full/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/generic_trait_full/src/main.rs -------------------------------------------------------------------------------- /Chapter09/generic_trait_where/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/generic_trait_where/Cargo.lock -------------------------------------------------------------------------------- /Chapter09/generic_trait_where/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/generic_trait_where/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/generic_trait_where/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/generic_trait_where/src/main.rs -------------------------------------------------------------------------------- /Chapter09/generic_traits_simple/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "generic_traits_simple" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/generic_traits_simple/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/generic_traits_simple/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/generic_traits_simple/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/generic_traits_simple/src/main.rs -------------------------------------------------------------------------------- /Chapter09/generic_typeof/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "generic_typeof" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/generic_typeof/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "generic_typeof" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter09/generic_typeof/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/generic_typeof/src/main.rs -------------------------------------------------------------------------------- /Chapter09/generic_typeof_print/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "generic_typeof_print" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/generic_typeof_print/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/generic_typeof_print/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/generic_typeof_print/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/generic_typeof_print/src/main.rs -------------------------------------------------------------------------------- /Chapter09/impl_example/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/impl_example/Cargo.lock -------------------------------------------------------------------------------- /Chapter09/impl_example/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/impl_example/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/impl_example/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/impl_example/src/main.rs -------------------------------------------------------------------------------- /Chapter09/inheritance/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "inheritance" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/inheritance/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "inheritance" 3 | version = "0.1.0" 4 | 5 | [dependencies] 6 | -------------------------------------------------------------------------------- /Chapter09/inheritance/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/inheritance/src/main.rs -------------------------------------------------------------------------------- /Chapter09/multiply_generic_return_t/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "multiply_generic_return_t" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/multiply_generic_return_t/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/multiply_generic_return_t/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/multiply_generic_return_t/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/multiply_generic_return_t/src/main.rs -------------------------------------------------------------------------------- /Chapter09/non_generic_trait/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "non_generic_trait" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/non_generic_trait/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/non_generic_trait/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/non_generic_trait/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/non_generic_trait/src/main.rs -------------------------------------------------------------------------------- /Chapter09/override_default_method/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/override_default_method/Cargo.lock -------------------------------------------------------------------------------- /Chapter09/override_default_method/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/override_default_method/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/override_default_method/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/override_default_method/src/main.rs -------------------------------------------------------------------------------- /Chapter09/trait_bound_gen_struct/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "trait_bound_gen_struct" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/trait_bound_gen_struct/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/trait_bound_gen_struct/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/trait_bound_gen_struct/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/trait_bound_gen_struct/src/main.rs -------------------------------------------------------------------------------- /Chapter09/trait_object_static/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "trait_object_static" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/trait_object_static/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/trait_object_static/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/trait_object_static/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter09/trait_object_static/src/main.rs -------------------------------------------------------------------------------- /Chapter10/MathsLib/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "mathslib" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLib/Cargo.toml -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/bases/base_to_base.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLib/src/bases/base_to_base.rs -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/bases/from_base10.rs: -------------------------------------------------------------------------------- 1 | mod from_base10 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/bases/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLib/src/bases/mod.rs -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/bases/to_base10.rs: -------------------------------------------------------------------------------- 1 | mod to_base10 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/conversions/distance.rs: -------------------------------------------------------------------------------- 1 | mod distance 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/conversions/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLib/src/conversions/mod.rs -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/conversions/pressure.rs: -------------------------------------------------------------------------------- 1 | mod pressure 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/conversions/temperature.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLib/src/conversions/temperature.rs -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/conversions/volume.rs: -------------------------------------------------------------------------------- 1 | mod volume 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLib/src/lib.rs -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/regression_analysis/intercepts.rs: -------------------------------------------------------------------------------- 1 | mod intercepts 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/regression_analysis/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLib/src/regression_analysis/mod.rs -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/regression_analysis/statistics.rs: -------------------------------------------------------------------------------- 1 | mod statistics 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/trigonometry/arc.rs: -------------------------------------------------------------------------------- 1 | mod arc 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/trigonometry/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLib/src/trigonometry/mod.rs -------------------------------------------------------------------------------- /Chapter10/MathsLib/src/trigonometry/natural.rs: -------------------------------------------------------------------------------- 1 | mod natural 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/tests/base_tests/mod.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/tests/conversion_tests/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLib/tests/conversion_tests/mod.rs -------------------------------------------------------------------------------- /Chapter10/MathsLib/tests/conversion_tests/temperature_tests.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLib/tests/conversion_tests/temperature_tests.rs -------------------------------------------------------------------------------- /Chapter10/MathsLib/tests/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLib/tests/lib.rs -------------------------------------------------------------------------------- /Chapter10/MathsLib/tests/regression_analysis_tests/mod.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter10/MathsLib/tests/trigonometry_tests/mod.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFile/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "MathsLibMultiFile" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFile/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLibMultiFile/Cargo.toml -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFile/src/Bases.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLibMultiFile/src/Bases.rs -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFile/src/Conversions.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLibMultiFile/src/Conversions.rs -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFile/src/RegressionAnalysis.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLibMultiFile/src/RegressionAnalysis.rs -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFile/src/Trigonometry.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLibMultiFile/src/Trigonometry.rs -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFile/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLibMultiFile/src/lib.rs -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "MathsLibMultiFileDirs" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLibMultiFileDirs/Cargo.toml -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Bases/BaseToBase.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLibMultiFileDirs/src/Bases/BaseToBase.rs -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Bases/FromBase10.rs: -------------------------------------------------------------------------------- 1 | mod FromBase10 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Bases/ToBase10.rs: -------------------------------------------------------------------------------- 1 | mod ToBase10 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Bases/mod.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Conversions/Distance.rs: -------------------------------------------------------------------------------- 1 | mod Distance 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Conversions/Pressure.rs: -------------------------------------------------------------------------------- 1 | mod Pressure 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Conversions/Temperature.rs: -------------------------------------------------------------------------------- 1 | mod Temperature 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Conversions/Volume.rs: -------------------------------------------------------------------------------- 1 | mod Volume 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Conversions/mod.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/RegressionAnalysis/Intercepts.rs: -------------------------------------------------------------------------------- 1 | mod Intercepts 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/RegressionAnalysis/Statistics.rs: -------------------------------------------------------------------------------- 1 | mod Statistics 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/RegressionAnalysis/mod.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Trigonometry/Arc.rs: -------------------------------------------------------------------------------- 1 | mod Arc 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Trigonometry/Natural.rs: -------------------------------------------------------------------------------- 1 | mod Natural 2 | { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/Trigonometry/mod.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter10/MathsLibMultiFileDirs/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLibMultiFileDirs/src/lib.rs -------------------------------------------------------------------------------- /Chapter10/MathsLibStructure/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "MathsLibStructure" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/MathsLibStructure/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLibStructure/Cargo.toml -------------------------------------------------------------------------------- /Chapter10/MathsLibStructure/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/MathsLibStructure/src/lib.rs -------------------------------------------------------------------------------- /Chapter10/QuickTest/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "QuickTest" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/QuickTest/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/QuickTest/Cargo.toml -------------------------------------------------------------------------------- /Chapter10/QuickTest/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/QuickTest/src/main.rs -------------------------------------------------------------------------------- /Chapter10/first_run_out/1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/first_run_out/1.txt -------------------------------------------------------------------------------- /Chapter10/first_run_out/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "first_run_out" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/first_run_out/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/first_run_out/Cargo.toml -------------------------------------------------------------------------------- /Chapter10/first_run_out/libmathslib.rlib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/first_run_out/libmathslib.rlib -------------------------------------------------------------------------------- /Chapter10/first_run_out/mathslib.0.bytecode.deflate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/first_run_out/mathslib.0.bytecode.deflate -------------------------------------------------------------------------------- /Chapter10/first_run_out/mathslib.0.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/first_run_out/mathslib.0.o -------------------------------------------------------------------------------- /Chapter10/first_run_out/rust.metadata.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/first_run_out/rust.metadata.bin -------------------------------------------------------------------------------- /Chapter10/first_run_out/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter10/first_run_out/src/main.rs -------------------------------------------------------------------------------- /Chapter11/SimpleThreadExample/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/SimpleThreadExample/Cargo.lock -------------------------------------------------------------------------------- /Chapter11/SimpleThreadExample/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/SimpleThreadExample/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/SimpleThreadExample/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/SimpleThreadExample/src/lib.rs -------------------------------------------------------------------------------- /Chapter11/SimpleThreadExample/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/SimpleThreadExample/src/main.rs -------------------------------------------------------------------------------- /Chapter11/channels/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "channels" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter11/channels/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/channels/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/channels/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/channels/src/main.rs -------------------------------------------------------------------------------- /Chapter11/close_fn_args/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "close_fn_args" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter11/close_fn_args/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/close_fn_args/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/close_fn_args/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/close_fn_args/src/main.rs -------------------------------------------------------------------------------- /Chapter11/close_mut_error/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "close_mut_error" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter11/close_mut_error/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/close_mut_error/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/close_mut_error/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/close_mut_error/src/main.rs -------------------------------------------------------------------------------- /Chapter11/closures/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "closures" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter11/closures/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/closures/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/closures/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/closures/src/main.rs -------------------------------------------------------------------------------- /Chapter11/joined_thread/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "joined_thread" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter11/joined_thread/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/joined_thread/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/joined_thread/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/joined_thread/src/main.rs -------------------------------------------------------------------------------- /Chapter11/move_closure_one/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "move_closure_one" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter11/move_closure_one/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/move_closure_one/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/move_closure_one/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/move_closure_one/src/main.rs -------------------------------------------------------------------------------- /Chapter11/mutex/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "mutex" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter11/mutex/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/mutex/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/mutex/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/mutex/src/main.rs -------------------------------------------------------------------------------- /Chapter11/return_closure_one/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "return_closure_one" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter11/return_closure_one/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/return_closure_one/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/return_closure_one/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/return_closure_one/src/main.rs -------------------------------------------------------------------------------- /Chapter11/return_closure_three/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "return_closure_three" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter11/return_closure_three/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/return_closure_three/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/return_closure_three/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/Chapter11/return_closure_three/src/main.rs -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Learning-Rust/HEAD/README.md --------------------------------------------------------------------------------