├── Chapter01 ├── arrays.rs ├── closures.rs ├── enum_methods.rs ├── enums.rs ├── exercise_word_counter.rs ├── first_program.rs ├── for_loops.rs ├── function_mut.rs ├── functions.rs ├── greet.rs ├── hashmaps.rs ├── if_assign.rs ├── if_else.rs ├── if_else_no_value.rs ├── loop_labels.rs ├── loops.rs ├── match_expression.rs ├── slices.rs ├── strings.rs ├── struct_methods.rs ├── structs.rs ├── tuple_struct.rs ├── tuples.rs ├── unit_struct.rs ├── use.rs ├── variables.rs ├── vec.rs └── while.rs ├── Chapter02 ├── cargo_manifest_example │ └── Cargo.toml ├── file_as_module.rs ├── imgtool │ ├── Cargo.lock │ ├── Cargo.toml │ ├── assets │ │ └── ferris.png │ └── src │ │ └── main.rs ├── mod_within.rs ├── modules_demo │ ├── foo.rs │ └── main.rs ├── my_program │ ├── foo.rs │ ├── foo │ │ └── bar.rs │ └── main.rs ├── myexponent │ ├── Cargo.lock │ ├── Cargo.toml │ ├── examples │ │ └── basic.rs │ └── src │ │ └── lib.rs └── workspace_demo │ ├── Cargo.lock │ ├── Cargo.toml │ ├── app │ ├── Cargo.toml │ └── src │ │ └── main.rs │ └── my_crate │ ├── Cargo.toml │ └── src │ └── lib.rs ├── Chapter03 ├── bench_example │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── criterion_demo │ ├── Cargo.lock │ ├── Cargo.toml │ ├── benches │ │ └── fibonacci.rs │ └── src │ │ └── lib.rs ├── doctest_demo │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── first_unit_test.rs ├── ignored_test.rs ├── integration_test │ ├── Cargo.lock │ ├── Cargo.toml │ ├── src │ │ └── lib.rs │ └── tests │ │ ├── common.rs │ │ └── sum.rs ├── logic_gates │ ├── .gitignore │ ├── .travis.yml │ ├── Cargo.toml │ ├── LICENSE │ ├── README.md │ ├── logic_gate.png │ ├── src │ │ └── lib.rs │ └── tests │ │ └── half_adder.rs ├── logic_gates_icon.png ├── panic_test.rs ├── silly_loop.rs └── unit_test │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── lib.rs ├── Chapter04 ├── .gitignore ├── complex │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── creating_generic_vec.rs ├── expressions.rs ├── foo.txt ├── generic_enum.rs ├── generic_function.rs ├── generic_struct.rs ├── generic_struct_impl.rs ├── impl_trait_both.rs ├── impl_trait_closure.rs ├── impl_trait_syntax.rs ├── let_pattern_wrapper.rs ├── super_player │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ ├── main.rs │ │ └── media.rs ├── trait_bound_basics.rs ├── trait_bound_basics_fixed.rs ├── trait_bound_functions.rs ├── trait_bound_intro.rs ├── trait_bound_intro_fixed.rs ├── trait_bounds_types.rs ├── trait_composition.rs ├── trait_inheritance.rs ├── trait_objects.rs ├── unusable_str.rs ├── using_generic_func.rs └── using_generic_vec.rs ├── Chapter05 ├── borrowing_basics.rs ├── borrowing_functions.rs ├── borrowing_match.rs ├── box_basics.rs ├── buffer_overflow.c ├── catch_unwind.rs ├── cell.rs ├── cell_cache.rs ├── data.txt ├── drop.rs ├── exclusive_borrow.rs ├── explicit_copy.rs ├── explicit_lifetimes.rs ├── iterator_invalidation.cpp ├── lifetime_basics.rs ├── lifetime_bounds.rs ├── lifetime_bounds_short.rs ├── lifetime_impls.rs ├── lifetime_struct.rs ├── lifetime_subtyping.rs ├── linked_list.rs ├── main_result.rs ├── making_copy_types.rs ├── making_copy_types_fixed.rs ├── multiple_lifetimes.rs ├── mutable_borrow.rs ├── ownership_basics.rs ├── ownership_closures.rs ├── ownership_functions.rs ├── ownership_functions_back.rs ├── ownership_match.rs ├── ownership_methods.rs ├── ownership_primitives.rs ├── panic_unwinding.rs ├── rc_3.rs ├── rc_weak.rs ├── recursive_type.rs ├── refcell_basics.rs ├── result_basics.rs ├── result_basics_fixed.rs ├── result_common_pattern.rs ├── return_func_ref.rs ├── scopes.rs ├── stack_basics.rs ├── static_lifetime.rs ├── todolist_parser │ ├── Cargo.lock │ ├── Cargo.toml │ ├── examples │ │ ├── basics.rs │ │ ├── todo │ │ └── todo_junk │ └── src │ │ ├── error.rs │ │ └── lib.rs ├── uninitialized_reads.c ├── using_lifetimes.rs ├── using_map.rs ├── using_options.rs ├── using_options_match.rs ├── using_options_unwrap.rs ├── using_question_operator.rs └── without_cell.rs ├── Chapter06 ├── catch_unwind.rs ├── create_result.rs ├── create_result_fixed.rs ├── data.txt ├── main_result.rs ├── panic_unwinding.rs ├── result_basics.rs ├── result_basics_fixed.rs ├── result_common_pattern.rs ├── todolist_parser │ ├── Cargo.lock │ ├── Cargo.toml │ ├── examples │ │ ├── README.md │ │ ├── basics.rs │ │ ├── malformed_todo │ │ └── todo │ └── src │ │ ├── error.rs │ │ └── lib.rs ├── using_map.rs ├── using_options.rs ├── using_options_match.rs ├── using_options_unwrap.rs └── using_question_operator.rs ├── Chapter07 ├── block_expr.rs ├── borrowed_strings.rs ├── const_fn.rs ├── const_fn_file.rs ├── custom_iterator.rs ├── destructure_enum.rs ├── destructure_func_param.rs ├── destructure_struct.rs ├── enum_struct_consts.rs ├── fn_closure.rs ├── fn_mut_closure.rs ├── fn_once.rs ├── function_types.rs ├── if_expr.rs ├── let_ref_mut.rs ├── loop_expr.rs ├── match_ref.rs ├── nested_imports.rs ├── object_safety.rs ├── pointer_layouts.rs ├── re-exports │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ ├── foo.rs │ │ ├── foo │ │ └── bar.rs │ │ └── main.rs ├── refutable_pattern.rs ├── safe_arithmetic.rs ├── scopes.rs ├── serde_demo │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── str_type.rs ├── string_apis.rs ├── string_chars.rs ├── string_concat.rs ├── string_indexing.rs ├── string_owned.rs ├── string_range_slice.rs ├── string_slices_func.rs ├── strings.rs ├── trait_constants.rs ├── type_alias.rs ├── type_inference_iterator.rs ├── ufcs.rs ├── unions.rs └── unusable_str.rs ├── Chapter08 ├── actor_demo │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── arc_mutex.rs ├── async_channels.rs ├── customize_threads.rs ├── mutex_basics.rs ├── sync_channels.rs ├── thread_arc.rs ├── thread_basics.rs ├── thread_basics_join.rs ├── thread_moves.rs ├── thread_mut.rs ├── thread_rc.rs ├── thread_read.rs ├── thread_rwlock.rs ├── threads_shared_owner.rs └── threads_sharing.rs ├── Chapter09 ├── c_macros.c ├── c_macros_rust.rs ├── first_macro.rs ├── http_tester │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── into_map_demo │ ├── Cargo.lock │ ├── Cargo.toml │ ├── into_map │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── into_map_derive │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ └── src │ │ └── main.rs ├── macro_map │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── lib.rs └── print_formatting.rs ├── Chapter10 ├── both_true_false.c ├── c_from_rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── mystrlen.c │ └── src │ │ └── main.rs ├── edit_distance │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── examples │ │ └── basic.rs │ ├── liblevenshtein.a │ └── src │ │ ├── bindings.rs │ │ └── lib.rs ├── native_counter │ ├── .gitignore │ ├── README.md │ ├── lib │ │ └── index.js │ ├── main.js │ ├── native │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── build.rs │ │ └── src │ │ │ └── lib.rs │ └── package.json ├── rust_from_c │ ├── Cargo.lock │ ├── Cargo.toml │ ├── Makefile │ ├── main │ ├── main.c │ └── src │ │ └── lib.rs ├── unsafe_function.rs ├── unsafe_trait_and_impl.rs └── word_suffix │ ├── Cargo.lock │ ├── Cargo.toml │ ├── README.md │ ├── main.py │ └── src │ └── lib.rs ├── Chapter11 ├── env_logger_demo │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── log4rs_demo │ ├── Cargo.lock │ ├── Cargo.toml │ ├── config │ │ └── log4rs.yaml │ ├── log │ │ └── my_lib.log │ ├── my_app │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── log │ │ │ └── requests.log │ │ └── src │ │ │ └── main.rs │ └── my_lib │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ └── src │ │ └── lib.rs ├── slog_demo │ ├── Cargo.lock │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── enemy.rs │ │ ├── main.rs │ │ ├── player.rs │ │ └── weapon.rs └── user_auth │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── lib.rs ├── Chapter12 ├── rudis_async │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ ├── codec.rs │ │ ├── commands.rs │ │ └── main.rs └── rudis_sync │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ ├── commands.rs │ └── main.rs ├── Chapter13 ├── hyperurl │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ ├── index.rs │ │ ├── main.rs │ │ ├── service.rs │ │ └── shortener.rs ├── linksnap │ ├── Cargo.lock │ ├── Cargo.toml │ ├── src │ │ ├── links.rs │ │ ├── main.rs │ │ ├── route_handlers.rs │ │ └── state.rs │ └── test_server.sh └── shorten │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── main.rs ├── Chapter14 ├── linksnap_v2 │ ├── .env │ ├── Cargo.lock │ ├── Cargo.toml │ ├── diesel.toml │ ├── migrations │ │ ├── .gitkeep │ │ ├── 00000000000000_diesel_initial_setup │ │ │ ├── down.sql │ │ │ └── up.sql │ │ └── 2019-01-05-221938_linksnap_db │ │ │ ├── down.sql │ │ │ └── up.sql │ └── src │ │ ├── main.rs │ │ ├── models.rs │ │ ├── route_handlers.rs │ │ ├── schema.rs │ │ └── state.rs ├── postgres_demo │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── r2d2_demo │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs └── rusqlite_demo │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── books │ ├── books.csv │ └── src │ └── main.rs ├── Chapter15 └── livemd │ ├── Cargo.lock │ ├── Cargo.toml │ ├── app │ ├── assets │ │ └── ferris.png │ ├── index.html │ ├── index.js │ ├── package.json │ ├── styles.css │ ├── webpack.config.js │ └── yarn.lock │ ├── run.sh │ └── src │ └── lib.rs ├── Chapter16 └── hews │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ ├── app.rs │ ├── hackernews.rs │ └── main.rs ├── Chapter17 ├── buggie │ ├── .vscode │ │ └── launch.json │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs └── rr_demo │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── main.rs ├── LICENSE └── README.md /Chapter01/arrays.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/arrays.rs -------------------------------------------------------------------------------- /Chapter01/closures.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/closures.rs -------------------------------------------------------------------------------- /Chapter01/enum_methods.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/enum_methods.rs -------------------------------------------------------------------------------- /Chapter01/enums.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/enums.rs -------------------------------------------------------------------------------- /Chapter01/exercise_word_counter.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/exercise_word_counter.rs -------------------------------------------------------------------------------- /Chapter01/first_program.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/first_program.rs -------------------------------------------------------------------------------- /Chapter01/for_loops.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/for_loops.rs -------------------------------------------------------------------------------- /Chapter01/function_mut.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/function_mut.rs -------------------------------------------------------------------------------- /Chapter01/functions.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/functions.rs -------------------------------------------------------------------------------- /Chapter01/greet.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/greet.rs -------------------------------------------------------------------------------- /Chapter01/hashmaps.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/hashmaps.rs -------------------------------------------------------------------------------- /Chapter01/if_assign.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/if_assign.rs -------------------------------------------------------------------------------- /Chapter01/if_else.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/if_else.rs -------------------------------------------------------------------------------- /Chapter01/if_else_no_value.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/if_else_no_value.rs -------------------------------------------------------------------------------- /Chapter01/loop_labels.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/loop_labels.rs -------------------------------------------------------------------------------- /Chapter01/loops.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/loops.rs -------------------------------------------------------------------------------- /Chapter01/match_expression.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/match_expression.rs -------------------------------------------------------------------------------- /Chapter01/slices.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/slices.rs -------------------------------------------------------------------------------- /Chapter01/strings.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/strings.rs -------------------------------------------------------------------------------- /Chapter01/struct_methods.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/struct_methods.rs -------------------------------------------------------------------------------- /Chapter01/structs.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/structs.rs -------------------------------------------------------------------------------- /Chapter01/tuple_struct.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/tuple_struct.rs -------------------------------------------------------------------------------- /Chapter01/tuples.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/tuples.rs -------------------------------------------------------------------------------- /Chapter01/unit_struct.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/unit_struct.rs -------------------------------------------------------------------------------- /Chapter01/use.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/use.rs -------------------------------------------------------------------------------- /Chapter01/variables.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/variables.rs -------------------------------------------------------------------------------- /Chapter01/vec.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/vec.rs -------------------------------------------------------------------------------- /Chapter01/while.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter01/while.rs -------------------------------------------------------------------------------- /Chapter02/cargo_manifest_example/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/cargo_manifest_example/Cargo.toml -------------------------------------------------------------------------------- /Chapter02/file_as_module.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/file_as_module.rs -------------------------------------------------------------------------------- /Chapter02/imgtool/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/imgtool/Cargo.lock -------------------------------------------------------------------------------- /Chapter02/imgtool/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/imgtool/Cargo.toml -------------------------------------------------------------------------------- /Chapter02/imgtool/assets/ferris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/imgtool/assets/ferris.png -------------------------------------------------------------------------------- /Chapter02/imgtool/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/imgtool/src/main.rs -------------------------------------------------------------------------------- /Chapter02/mod_within.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/mod_within.rs -------------------------------------------------------------------------------- /Chapter02/modules_demo/foo.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/modules_demo/foo.rs -------------------------------------------------------------------------------- /Chapter02/modules_demo/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/modules_demo/main.rs -------------------------------------------------------------------------------- /Chapter02/my_program/foo.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/my_program/foo.rs -------------------------------------------------------------------------------- /Chapter02/my_program/foo/bar.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/my_program/foo/bar.rs -------------------------------------------------------------------------------- /Chapter02/my_program/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/my_program/main.rs -------------------------------------------------------------------------------- /Chapter02/myexponent/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "myexponent" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter02/myexponent/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/myexponent/Cargo.toml -------------------------------------------------------------------------------- /Chapter02/myexponent/examples/basic.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/myexponent/examples/basic.rs -------------------------------------------------------------------------------- /Chapter02/myexponent/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/myexponent/src/lib.rs -------------------------------------------------------------------------------- /Chapter02/workspace_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/workspace_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter02/workspace_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/workspace_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter02/workspace_demo/app/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/workspace_demo/app/Cargo.toml -------------------------------------------------------------------------------- /Chapter02/workspace_demo/app/src/main.rs: -------------------------------------------------------------------------------- 1 | 2 | fn main() { 3 | my_crate::greet(); 4 | } 5 | -------------------------------------------------------------------------------- /Chapter02/workspace_demo/my_crate/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter02/workspace_demo/my_crate/Cargo.toml -------------------------------------------------------------------------------- /Chapter02/workspace_demo/my_crate/src/lib.rs: -------------------------------------------------------------------------------- 1 | 2 | pub fn greet() { 3 | println!("Hi from my crate"); 4 | } 5 | -------------------------------------------------------------------------------- /Chapter03/bench_example/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "bench_example" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter03/bench_example/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/bench_example/Cargo.toml -------------------------------------------------------------------------------- /Chapter03/bench_example/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/bench_example/src/lib.rs -------------------------------------------------------------------------------- /Chapter03/criterion_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/criterion_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter03/criterion_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/criterion_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter03/criterion_demo/benches/fibonacci.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/criterion_demo/benches/fibonacci.rs -------------------------------------------------------------------------------- /Chapter03/criterion_demo/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/criterion_demo/src/lib.rs -------------------------------------------------------------------------------- /Chapter03/doctest_demo/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "doctest_demo" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter03/doctest_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/doctest_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter03/doctest_demo/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/doctest_demo/src/lib.rs -------------------------------------------------------------------------------- /Chapter03/first_unit_test.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/first_unit_test.rs -------------------------------------------------------------------------------- /Chapter03/ignored_test.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/ignored_test.rs -------------------------------------------------------------------------------- /Chapter03/integration_test/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/integration_test/Cargo.lock -------------------------------------------------------------------------------- /Chapter03/integration_test/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/integration_test/Cargo.toml -------------------------------------------------------------------------------- /Chapter03/integration_test/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/integration_test/src/lib.rs -------------------------------------------------------------------------------- /Chapter03/integration_test/tests/common.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/integration_test/tests/common.rs -------------------------------------------------------------------------------- /Chapter03/integration_test/tests/sum.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/integration_test/tests/sum.rs -------------------------------------------------------------------------------- /Chapter03/logic_gates/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | Cargo.lock 4 | -------------------------------------------------------------------------------- /Chapter03/logic_gates/.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/logic_gates/.travis.yml -------------------------------------------------------------------------------- /Chapter03/logic_gates/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/logic_gates/Cargo.toml -------------------------------------------------------------------------------- /Chapter03/logic_gates/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/logic_gates/LICENSE -------------------------------------------------------------------------------- /Chapter03/logic_gates/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/logic_gates/README.md -------------------------------------------------------------------------------- /Chapter03/logic_gates/logic_gate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/logic_gates/logic_gate.png -------------------------------------------------------------------------------- /Chapter03/logic_gates/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/logic_gates/src/lib.rs -------------------------------------------------------------------------------- /Chapter03/logic_gates/tests/half_adder.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/logic_gates/tests/half_adder.rs -------------------------------------------------------------------------------- /Chapter03/logic_gates_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/logic_gates_icon.png -------------------------------------------------------------------------------- /Chapter03/panic_test.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/panic_test.rs -------------------------------------------------------------------------------- /Chapter03/silly_loop.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/silly_loop.rs -------------------------------------------------------------------------------- /Chapter03/unit_test/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "unit_test" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter03/unit_test/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/unit_test/Cargo.toml -------------------------------------------------------------------------------- /Chapter03/unit_test/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter03/unit_test/src/lib.rs -------------------------------------------------------------------------------- /Chapter04/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /Chapter04/complex/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "complex" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/complex/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/complex/Cargo.toml -------------------------------------------------------------------------------- /Chapter04/complex/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/complex/src/lib.rs -------------------------------------------------------------------------------- /Chapter04/creating_generic_vec.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let a = Vec::new(); 3 | } -------------------------------------------------------------------------------- /Chapter04/expressions.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/expressions.rs -------------------------------------------------------------------------------- /Chapter04/foo.txt: -------------------------------------------------------------------------------- 1 | Rust -------------------------------------------------------------------------------- /Chapter04/generic_enum.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/generic_enum.rs -------------------------------------------------------------------------------- /Chapter04/generic_function.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/generic_function.rs -------------------------------------------------------------------------------- /Chapter04/generic_struct.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/generic_struct.rs -------------------------------------------------------------------------------- /Chapter04/generic_struct_impl.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/generic_struct_impl.rs -------------------------------------------------------------------------------- /Chapter04/impl_trait_both.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/impl_trait_both.rs -------------------------------------------------------------------------------- /Chapter04/impl_trait_closure.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/impl_trait_closure.rs -------------------------------------------------------------------------------- /Chapter04/impl_trait_syntax.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/impl_trait_syntax.rs -------------------------------------------------------------------------------- /Chapter04/let_pattern_wrapper.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/let_pattern_wrapper.rs -------------------------------------------------------------------------------- /Chapter04/super_player/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "super_player" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter04/super_player/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/super_player/Cargo.toml -------------------------------------------------------------------------------- /Chapter04/super_player/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/super_player/src/main.rs -------------------------------------------------------------------------------- /Chapter04/super_player/src/media.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/super_player/src/media.rs -------------------------------------------------------------------------------- /Chapter04/trait_bound_basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/trait_bound_basics.rs -------------------------------------------------------------------------------- /Chapter04/trait_bound_basics_fixed.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/trait_bound_basics_fixed.rs -------------------------------------------------------------------------------- /Chapter04/trait_bound_functions.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/trait_bound_functions.rs -------------------------------------------------------------------------------- /Chapter04/trait_bound_intro.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/trait_bound_intro.rs -------------------------------------------------------------------------------- /Chapter04/trait_bound_intro_fixed.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/trait_bound_intro_fixed.rs -------------------------------------------------------------------------------- /Chapter04/trait_bounds_types.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/trait_bounds_types.rs -------------------------------------------------------------------------------- /Chapter04/trait_composition.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/trait_composition.rs -------------------------------------------------------------------------------- /Chapter04/trait_inheritance.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/trait_inheritance.rs -------------------------------------------------------------------------------- /Chapter04/trait_objects.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/trait_objects.rs -------------------------------------------------------------------------------- /Chapter04/unusable_str.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/unusable_str.rs -------------------------------------------------------------------------------- /Chapter04/using_generic_func.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/using_generic_func.rs -------------------------------------------------------------------------------- /Chapter04/using_generic_vec.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter04/using_generic_vec.rs -------------------------------------------------------------------------------- /Chapter05/borrowing_basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/borrowing_basics.rs -------------------------------------------------------------------------------- /Chapter05/borrowing_functions.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/borrowing_functions.rs -------------------------------------------------------------------------------- /Chapter05/borrowing_match.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/borrowing_match.rs -------------------------------------------------------------------------------- /Chapter05/box_basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/box_basics.rs -------------------------------------------------------------------------------- /Chapter05/buffer_overflow.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/buffer_overflow.c -------------------------------------------------------------------------------- /Chapter05/catch_unwind.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/catch_unwind.rs -------------------------------------------------------------------------------- /Chapter05/cell.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/cell.rs -------------------------------------------------------------------------------- /Chapter05/cell_cache.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/cell_cache.rs -------------------------------------------------------------------------------- /Chapter05/data.txt: -------------------------------------------------------------------------------- 1 | If you got no Option, use Result ! -------------------------------------------------------------------------------- /Chapter05/drop.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/drop.rs -------------------------------------------------------------------------------- /Chapter05/exclusive_borrow.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/exclusive_borrow.rs -------------------------------------------------------------------------------- /Chapter05/explicit_copy.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/explicit_copy.rs -------------------------------------------------------------------------------- /Chapter05/explicit_lifetimes.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/explicit_lifetimes.rs -------------------------------------------------------------------------------- /Chapter05/iterator_invalidation.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/iterator_invalidation.cpp -------------------------------------------------------------------------------- /Chapter05/lifetime_basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/lifetime_basics.rs -------------------------------------------------------------------------------- /Chapter05/lifetime_bounds.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/lifetime_bounds.rs -------------------------------------------------------------------------------- /Chapter05/lifetime_bounds_short.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/lifetime_bounds_short.rs -------------------------------------------------------------------------------- /Chapter05/lifetime_impls.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/lifetime_impls.rs -------------------------------------------------------------------------------- /Chapter05/lifetime_struct.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/lifetime_struct.rs -------------------------------------------------------------------------------- /Chapter05/lifetime_subtyping.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/lifetime_subtyping.rs -------------------------------------------------------------------------------- /Chapter05/linked_list.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/linked_list.rs -------------------------------------------------------------------------------- /Chapter05/main_result.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/main_result.rs -------------------------------------------------------------------------------- /Chapter05/making_copy_types.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/making_copy_types.rs -------------------------------------------------------------------------------- /Chapter05/making_copy_types_fixed.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/making_copy_types_fixed.rs -------------------------------------------------------------------------------- /Chapter05/multiple_lifetimes.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/multiple_lifetimes.rs -------------------------------------------------------------------------------- /Chapter05/mutable_borrow.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/mutable_borrow.rs -------------------------------------------------------------------------------- /Chapter05/ownership_basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/ownership_basics.rs -------------------------------------------------------------------------------- /Chapter05/ownership_closures.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/ownership_closures.rs -------------------------------------------------------------------------------- /Chapter05/ownership_functions.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/ownership_functions.rs -------------------------------------------------------------------------------- /Chapter05/ownership_functions_back.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/ownership_functions_back.rs -------------------------------------------------------------------------------- /Chapter05/ownership_match.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/ownership_match.rs -------------------------------------------------------------------------------- /Chapter05/ownership_methods.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/ownership_methods.rs -------------------------------------------------------------------------------- /Chapter05/ownership_primitives.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/ownership_primitives.rs -------------------------------------------------------------------------------- /Chapter05/panic_unwinding.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/panic_unwinding.rs -------------------------------------------------------------------------------- /Chapter05/rc_3.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/rc_3.rs -------------------------------------------------------------------------------- /Chapter05/rc_weak.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/rc_weak.rs -------------------------------------------------------------------------------- /Chapter05/recursive_type.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/recursive_type.rs -------------------------------------------------------------------------------- /Chapter05/refcell_basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/refcell_basics.rs -------------------------------------------------------------------------------- /Chapter05/result_basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/result_basics.rs -------------------------------------------------------------------------------- /Chapter05/result_basics_fixed.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/result_basics_fixed.rs -------------------------------------------------------------------------------- /Chapter05/result_common_pattern.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/result_common_pattern.rs -------------------------------------------------------------------------------- /Chapter05/return_func_ref.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/return_func_ref.rs -------------------------------------------------------------------------------- /Chapter05/scopes.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/scopes.rs -------------------------------------------------------------------------------- /Chapter05/stack_basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/stack_basics.rs -------------------------------------------------------------------------------- /Chapter05/static_lifetime.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/static_lifetime.rs -------------------------------------------------------------------------------- /Chapter05/todolist_parser/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "todolist_parser" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter05/todolist_parser/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/todolist_parser/Cargo.toml -------------------------------------------------------------------------------- /Chapter05/todolist_parser/examples/basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/todolist_parser/examples/basics.rs -------------------------------------------------------------------------------- /Chapter05/todolist_parser/examples/todo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/todolist_parser/examples/todo -------------------------------------------------------------------------------- /Chapter05/todolist_parser/examples/todo_junk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/todolist_parser/examples/todo_junk -------------------------------------------------------------------------------- /Chapter05/todolist_parser/src/error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/todolist_parser/src/error.rs -------------------------------------------------------------------------------- /Chapter05/todolist_parser/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/todolist_parser/src/lib.rs -------------------------------------------------------------------------------- /Chapter05/uninitialized_reads.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/uninitialized_reads.c -------------------------------------------------------------------------------- /Chapter05/using_lifetimes.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/using_lifetimes.rs -------------------------------------------------------------------------------- /Chapter05/using_map.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/using_map.rs -------------------------------------------------------------------------------- /Chapter05/using_options.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/using_options.rs -------------------------------------------------------------------------------- /Chapter05/using_options_match.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/using_options_match.rs -------------------------------------------------------------------------------- /Chapter05/using_options_unwrap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/using_options_unwrap.rs -------------------------------------------------------------------------------- /Chapter05/using_question_operator.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/using_question_operator.rs -------------------------------------------------------------------------------- /Chapter05/without_cell.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter05/without_cell.rs -------------------------------------------------------------------------------- /Chapter06/catch_unwind.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/catch_unwind.rs -------------------------------------------------------------------------------- /Chapter06/create_result.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/create_result.rs -------------------------------------------------------------------------------- /Chapter06/create_result_fixed.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/create_result_fixed.rs -------------------------------------------------------------------------------- /Chapter06/data.txt: -------------------------------------------------------------------------------- 1 | If you got no Option, use Result ! -------------------------------------------------------------------------------- /Chapter06/main_result.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/main_result.rs -------------------------------------------------------------------------------- /Chapter06/panic_unwinding.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/panic_unwinding.rs -------------------------------------------------------------------------------- /Chapter06/result_basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/result_basics.rs -------------------------------------------------------------------------------- /Chapter06/result_basics_fixed.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/result_basics_fixed.rs -------------------------------------------------------------------------------- /Chapter06/result_common_pattern.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/result_common_pattern.rs -------------------------------------------------------------------------------- /Chapter06/todolist_parser/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "todolist_parser" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter06/todolist_parser/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/todolist_parser/Cargo.toml -------------------------------------------------------------------------------- /Chapter06/todolist_parser/examples/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/todolist_parser/examples/README.md -------------------------------------------------------------------------------- /Chapter06/todolist_parser/examples/basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/todolist_parser/examples/basics.rs -------------------------------------------------------------------------------- /Chapter06/todolist_parser/examples/malformed_todo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/todolist_parser/examples/malformed_todo -------------------------------------------------------------------------------- /Chapter06/todolist_parser/examples/todo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/todolist_parser/examples/todo -------------------------------------------------------------------------------- /Chapter06/todolist_parser/src/error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/todolist_parser/src/error.rs -------------------------------------------------------------------------------- /Chapter06/todolist_parser/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/todolist_parser/src/lib.rs -------------------------------------------------------------------------------- /Chapter06/using_map.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/using_map.rs -------------------------------------------------------------------------------- /Chapter06/using_options.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/using_options.rs -------------------------------------------------------------------------------- /Chapter06/using_options_match.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/using_options_match.rs -------------------------------------------------------------------------------- /Chapter06/using_options_unwrap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/using_options_unwrap.rs -------------------------------------------------------------------------------- /Chapter06/using_question_operator.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter06/using_question_operator.rs -------------------------------------------------------------------------------- /Chapter07/block_expr.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/block_expr.rs -------------------------------------------------------------------------------- /Chapter07/borrowed_strings.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/borrowed_strings.rs -------------------------------------------------------------------------------- /Chapter07/const_fn.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/const_fn.rs -------------------------------------------------------------------------------- /Chapter07/const_fn_file.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/const_fn_file.rs -------------------------------------------------------------------------------- /Chapter07/custom_iterator.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/custom_iterator.rs -------------------------------------------------------------------------------- /Chapter07/destructure_enum.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/destructure_enum.rs -------------------------------------------------------------------------------- /Chapter07/destructure_func_param.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/destructure_func_param.rs -------------------------------------------------------------------------------- /Chapter07/destructure_struct.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/destructure_struct.rs -------------------------------------------------------------------------------- /Chapter07/enum_struct_consts.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/enum_struct_consts.rs -------------------------------------------------------------------------------- /Chapter07/fn_closure.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/fn_closure.rs -------------------------------------------------------------------------------- /Chapter07/fn_mut_closure.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/fn_mut_closure.rs -------------------------------------------------------------------------------- /Chapter07/fn_once.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/fn_once.rs -------------------------------------------------------------------------------- /Chapter07/function_types.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/function_types.rs -------------------------------------------------------------------------------- /Chapter07/if_expr.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/if_expr.rs -------------------------------------------------------------------------------- /Chapter07/let_ref_mut.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/let_ref_mut.rs -------------------------------------------------------------------------------- /Chapter07/loop_expr.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/loop_expr.rs -------------------------------------------------------------------------------- /Chapter07/match_ref.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/match_ref.rs -------------------------------------------------------------------------------- /Chapter07/nested_imports.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/nested_imports.rs -------------------------------------------------------------------------------- /Chapter07/object_safety.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/object_safety.rs -------------------------------------------------------------------------------- /Chapter07/pointer_layouts.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/pointer_layouts.rs -------------------------------------------------------------------------------- /Chapter07/re-exports/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "re-exports" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter07/re-exports/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/re-exports/Cargo.toml -------------------------------------------------------------------------------- /Chapter07/re-exports/src/foo.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/re-exports/src/foo.rs -------------------------------------------------------------------------------- /Chapter07/re-exports/src/foo/bar.rs: -------------------------------------------------------------------------------- 1 | // re-exports/src/foo/bar.rs 2 | 3 | pub struct Bar; -------------------------------------------------------------------------------- /Chapter07/re-exports/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/re-exports/src/main.rs -------------------------------------------------------------------------------- /Chapter07/refutable_pattern.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/refutable_pattern.rs -------------------------------------------------------------------------------- /Chapter07/safe_arithmetic.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/safe_arithmetic.rs -------------------------------------------------------------------------------- /Chapter07/scopes.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/scopes.rs -------------------------------------------------------------------------------- /Chapter07/serde_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/serde_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter07/serde_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/serde_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter07/serde_demo/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/serde_demo/src/main.rs -------------------------------------------------------------------------------- /Chapter07/str_type.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/str_type.rs -------------------------------------------------------------------------------- /Chapter07/string_apis.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/string_apis.rs -------------------------------------------------------------------------------- /Chapter07/string_chars.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/string_chars.rs -------------------------------------------------------------------------------- /Chapter07/string_concat.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/string_concat.rs -------------------------------------------------------------------------------- /Chapter07/string_indexing.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/string_indexing.rs -------------------------------------------------------------------------------- /Chapter07/string_owned.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter07/string_range_slice.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/string_range_slice.rs -------------------------------------------------------------------------------- /Chapter07/string_slices_func.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/string_slices_func.rs -------------------------------------------------------------------------------- /Chapter07/strings.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/strings.rs -------------------------------------------------------------------------------- /Chapter07/trait_constants.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/trait_constants.rs -------------------------------------------------------------------------------- /Chapter07/type_alias.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/type_alias.rs -------------------------------------------------------------------------------- /Chapter07/type_inference_iterator.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/type_inference_iterator.rs -------------------------------------------------------------------------------- /Chapter07/ufcs.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/ufcs.rs -------------------------------------------------------------------------------- /Chapter07/unions.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/unions.rs -------------------------------------------------------------------------------- /Chapter07/unusable_str.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter07/unusable_str.rs -------------------------------------------------------------------------------- /Chapter08/actor_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/actor_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter08/actor_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/actor_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter08/actor_demo/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/actor_demo/src/main.rs -------------------------------------------------------------------------------- /Chapter08/arc_mutex.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/arc_mutex.rs -------------------------------------------------------------------------------- /Chapter08/async_channels.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/async_channels.rs -------------------------------------------------------------------------------- /Chapter08/customize_threads.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/customize_threads.rs -------------------------------------------------------------------------------- /Chapter08/mutex_basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/mutex_basics.rs -------------------------------------------------------------------------------- /Chapter08/sync_channels.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/sync_channels.rs -------------------------------------------------------------------------------- /Chapter08/thread_arc.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/thread_arc.rs -------------------------------------------------------------------------------- /Chapter08/thread_basics.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/thread_basics.rs -------------------------------------------------------------------------------- /Chapter08/thread_basics_join.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/thread_basics_join.rs -------------------------------------------------------------------------------- /Chapter08/thread_moves.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/thread_moves.rs -------------------------------------------------------------------------------- /Chapter08/thread_mut.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/thread_mut.rs -------------------------------------------------------------------------------- /Chapter08/thread_rc.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/thread_rc.rs -------------------------------------------------------------------------------- /Chapter08/thread_read.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/thread_read.rs -------------------------------------------------------------------------------- /Chapter08/thread_rwlock.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/thread_rwlock.rs -------------------------------------------------------------------------------- /Chapter08/threads_shared_owner.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/threads_shared_owner.rs -------------------------------------------------------------------------------- /Chapter08/threads_sharing.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter08/threads_sharing.rs -------------------------------------------------------------------------------- /Chapter09/c_macros.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/c_macros.c -------------------------------------------------------------------------------- /Chapter09/c_macros_rust.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/c_macros_rust.rs -------------------------------------------------------------------------------- /Chapter09/first_macro.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/first_macro.rs -------------------------------------------------------------------------------- /Chapter09/http_tester/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/http_tester/Cargo.lock -------------------------------------------------------------------------------- /Chapter09/http_tester/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/http_tester/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/http_tester/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/http_tester/src/lib.rs -------------------------------------------------------------------------------- /Chapter09/into_map_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/into_map_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter09/into_map_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/into_map_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/into_map_demo/into_map/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "into_map" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/into_map_demo/into_map/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/into_map_demo/into_map/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/into_map_demo/into_map/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/into_map_demo/into_map/src/lib.rs -------------------------------------------------------------------------------- /Chapter09/into_map_demo/into_map_derive/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/into_map_demo/into_map_derive/Cargo.lock -------------------------------------------------------------------------------- /Chapter09/into_map_demo/into_map_derive/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/into_map_demo/into_map_derive/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/into_map_demo/into_map_derive/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/into_map_demo/into_map_derive/src/lib.rs -------------------------------------------------------------------------------- /Chapter09/into_map_demo/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/into_map_demo/src/main.rs -------------------------------------------------------------------------------- /Chapter09/macro_map/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "macro_map" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter09/macro_map/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/macro_map/Cargo.toml -------------------------------------------------------------------------------- /Chapter09/macro_map/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/macro_map/src/lib.rs -------------------------------------------------------------------------------- /Chapter09/print_formatting.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter09/print_formatting.rs -------------------------------------------------------------------------------- /Chapter10/both_true_false.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/both_true_false.c -------------------------------------------------------------------------------- /Chapter10/c_from_rust/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/c_from_rust/Cargo.lock -------------------------------------------------------------------------------- /Chapter10/c_from_rust/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/c_from_rust/Cargo.toml -------------------------------------------------------------------------------- /Chapter10/c_from_rust/build.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/c_from_rust/build.rs -------------------------------------------------------------------------------- /Chapter10/c_from_rust/mystrlen.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/c_from_rust/mystrlen.c -------------------------------------------------------------------------------- /Chapter10/c_from_rust/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/c_from_rust/src/main.rs -------------------------------------------------------------------------------- /Chapter10/edit_distance/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/edit_distance/Cargo.lock -------------------------------------------------------------------------------- /Chapter10/edit_distance/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/edit_distance/Cargo.toml -------------------------------------------------------------------------------- /Chapter10/edit_distance/build.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/edit_distance/build.rs -------------------------------------------------------------------------------- /Chapter10/edit_distance/examples/basic.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/edit_distance/examples/basic.rs -------------------------------------------------------------------------------- /Chapter10/edit_distance/liblevenshtein.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/edit_distance/liblevenshtein.a -------------------------------------------------------------------------------- /Chapter10/edit_distance/src/bindings.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/edit_distance/src/bindings.rs -------------------------------------------------------------------------------- /Chapter10/edit_distance/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/edit_distance/src/lib.rs -------------------------------------------------------------------------------- /Chapter10/native_counter/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/native_counter/.gitignore -------------------------------------------------------------------------------- /Chapter10/native_counter/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/native_counter/README.md -------------------------------------------------------------------------------- /Chapter10/native_counter/lib/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/native_counter/lib/index.js -------------------------------------------------------------------------------- /Chapter10/native_counter/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/native_counter/main.js -------------------------------------------------------------------------------- /Chapter10/native_counter/native/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/native_counter/native/Cargo.lock -------------------------------------------------------------------------------- /Chapter10/native_counter/native/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/native_counter/native/Cargo.toml -------------------------------------------------------------------------------- /Chapter10/native_counter/native/build.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/native_counter/native/build.rs -------------------------------------------------------------------------------- /Chapter10/native_counter/native/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/native_counter/native/src/lib.rs -------------------------------------------------------------------------------- /Chapter10/native_counter/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/native_counter/package.json -------------------------------------------------------------------------------- /Chapter10/rust_from_c/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "rust_from_c" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter10/rust_from_c/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/rust_from_c/Cargo.toml -------------------------------------------------------------------------------- /Chapter10/rust_from_c/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/rust_from_c/Makefile -------------------------------------------------------------------------------- /Chapter10/rust_from_c/main: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/rust_from_c/main -------------------------------------------------------------------------------- /Chapter10/rust_from_c/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/rust_from_c/main.c -------------------------------------------------------------------------------- /Chapter10/rust_from_c/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/rust_from_c/src/lib.rs -------------------------------------------------------------------------------- /Chapter10/unsafe_function.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/unsafe_function.rs -------------------------------------------------------------------------------- /Chapter10/unsafe_trait_and_impl.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/unsafe_trait_and_impl.rs -------------------------------------------------------------------------------- /Chapter10/word_suffix/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/word_suffix/Cargo.lock -------------------------------------------------------------------------------- /Chapter10/word_suffix/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/word_suffix/Cargo.toml -------------------------------------------------------------------------------- /Chapter10/word_suffix/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/word_suffix/README.md -------------------------------------------------------------------------------- /Chapter10/word_suffix/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/word_suffix/main.py -------------------------------------------------------------------------------- /Chapter10/word_suffix/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter10/word_suffix/src/lib.rs -------------------------------------------------------------------------------- /Chapter11/env_logger_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/env_logger_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter11/env_logger_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/env_logger_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/env_logger_demo/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/env_logger_demo/src/main.rs -------------------------------------------------------------------------------- /Chapter11/log4rs_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/log4rs_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter11/log4rs_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/log4rs_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/log4rs_demo/config/log4rs.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/log4rs_demo/config/log4rs.yaml -------------------------------------------------------------------------------- /Chapter11/log4rs_demo/log/my_lib.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/log4rs_demo/log/my_lib.log -------------------------------------------------------------------------------- /Chapter11/log4rs_demo/my_app/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | -------------------------------------------------------------------------------- /Chapter11/log4rs_demo/my_app/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/log4rs_demo/my_app/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/log4rs_demo/my_app/log/requests.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter11/log4rs_demo/my_app/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/log4rs_demo/my_app/src/main.rs -------------------------------------------------------------------------------- /Chapter11/log4rs_demo/my_lib/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | Cargo.lock 4 | -------------------------------------------------------------------------------- /Chapter11/log4rs_demo/my_lib/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/log4rs_demo/my_lib/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/log4rs_demo/my_lib/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/log4rs_demo/my_lib/src/lib.rs -------------------------------------------------------------------------------- /Chapter11/slog_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/slog_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter11/slog_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/slog_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/slog_demo/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter11/slog_demo/src/enemy.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/slog_demo/src/enemy.rs -------------------------------------------------------------------------------- /Chapter11/slog_demo/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/slog_demo/src/main.rs -------------------------------------------------------------------------------- /Chapter11/slog_demo/src/player.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/slog_demo/src/player.rs -------------------------------------------------------------------------------- /Chapter11/slog_demo/src/weapon.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/slog_demo/src/weapon.rs -------------------------------------------------------------------------------- /Chapter11/user_auth/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/user_auth/Cargo.lock -------------------------------------------------------------------------------- /Chapter11/user_auth/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/user_auth/Cargo.toml -------------------------------------------------------------------------------- /Chapter11/user_auth/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter11/user_auth/src/lib.rs -------------------------------------------------------------------------------- /Chapter12/rudis_async/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter12/rudis_async/Cargo.lock -------------------------------------------------------------------------------- /Chapter12/rudis_async/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter12/rudis_async/Cargo.toml -------------------------------------------------------------------------------- /Chapter12/rudis_async/src/codec.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter12/rudis_async/src/codec.rs -------------------------------------------------------------------------------- /Chapter12/rudis_async/src/commands.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter12/rudis_async/src/commands.rs -------------------------------------------------------------------------------- /Chapter12/rudis_async/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter12/rudis_async/src/main.rs -------------------------------------------------------------------------------- /Chapter12/rudis_sync/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | -------------------------------------------------------------------------------- /Chapter12/rudis_sync/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter12/rudis_sync/Cargo.lock -------------------------------------------------------------------------------- /Chapter12/rudis_sync/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter12/rudis_sync/Cargo.toml -------------------------------------------------------------------------------- /Chapter12/rudis_sync/src/commands.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter12/rudis_sync/src/commands.rs -------------------------------------------------------------------------------- /Chapter12/rudis_sync/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter12/rudis_sync/src/main.rs -------------------------------------------------------------------------------- /Chapter13/hyperurl/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/hyperurl/Cargo.lock -------------------------------------------------------------------------------- /Chapter13/hyperurl/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/hyperurl/Cargo.toml -------------------------------------------------------------------------------- /Chapter13/hyperurl/src/index.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/hyperurl/src/index.rs -------------------------------------------------------------------------------- /Chapter13/hyperurl/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/hyperurl/src/main.rs -------------------------------------------------------------------------------- /Chapter13/hyperurl/src/service.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/hyperurl/src/service.rs -------------------------------------------------------------------------------- /Chapter13/hyperurl/src/shortener.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/hyperurl/src/shortener.rs -------------------------------------------------------------------------------- /Chapter13/linksnap/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/linksnap/Cargo.lock -------------------------------------------------------------------------------- /Chapter13/linksnap/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/linksnap/Cargo.toml -------------------------------------------------------------------------------- /Chapter13/linksnap/src/links.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/linksnap/src/links.rs -------------------------------------------------------------------------------- /Chapter13/linksnap/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/linksnap/src/main.rs -------------------------------------------------------------------------------- /Chapter13/linksnap/src/route_handlers.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/linksnap/src/route_handlers.rs -------------------------------------------------------------------------------- /Chapter13/linksnap/src/state.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/linksnap/src/state.rs -------------------------------------------------------------------------------- /Chapter13/linksnap/test_server.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/linksnap/test_server.sh -------------------------------------------------------------------------------- /Chapter13/shorten/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/shorten/Cargo.lock -------------------------------------------------------------------------------- /Chapter13/shorten/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/shorten/Cargo.toml -------------------------------------------------------------------------------- /Chapter13/shorten/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter13/shorten/src/main.rs -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/.env -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/Cargo.lock -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/Cargo.toml -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/diesel.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/diesel.toml -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/migrations/00000000000000_diesel_initial_setup/down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/migrations/00000000000000_diesel_initial_setup/down.sql -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/migrations/00000000000000_diesel_initial_setup/up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/migrations/00000000000000_diesel_initial_setup/up.sql -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/migrations/2019-01-05-221938_linksnap_db/down.sql: -------------------------------------------------------------------------------- 1 | -- This file should undo anything in `up.sql` 2 | 3 | DROP TABLE linksnap -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/migrations/2019-01-05-221938_linksnap_db/up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/migrations/2019-01-05-221938_linksnap_db/up.sql -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/src/main.rs -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/src/models.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/src/models.rs -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/src/route_handlers.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/src/route_handlers.rs -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/src/schema.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/src/schema.rs -------------------------------------------------------------------------------- /Chapter14/linksnap_v2/src/state.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/linksnap_v2/src/state.rs -------------------------------------------------------------------------------- /Chapter14/postgres_demo/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | -------------------------------------------------------------------------------- /Chapter14/postgres_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/postgres_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter14/postgres_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/postgres_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter14/postgres_demo/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/postgres_demo/src/main.rs -------------------------------------------------------------------------------- /Chapter14/r2d2_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/r2d2_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter14/r2d2_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/r2d2_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter14/r2d2_demo/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/r2d2_demo/src/main.rs -------------------------------------------------------------------------------- /Chapter14/rusqlite_demo/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | -------------------------------------------------------------------------------- /Chapter14/rusqlite_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/rusqlite_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter14/rusqlite_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/rusqlite_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter14/rusqlite_demo/books: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/rusqlite_demo/books -------------------------------------------------------------------------------- /Chapter14/rusqlite_demo/books.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/rusqlite_demo/books.csv -------------------------------------------------------------------------------- /Chapter14/rusqlite_demo/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter14/rusqlite_demo/src/main.rs -------------------------------------------------------------------------------- /Chapter15/livemd/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter15/livemd/Cargo.lock -------------------------------------------------------------------------------- /Chapter15/livemd/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter15/livemd/Cargo.toml -------------------------------------------------------------------------------- /Chapter15/livemd/app/assets/ferris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter15/livemd/app/assets/ferris.png -------------------------------------------------------------------------------- /Chapter15/livemd/app/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter15/livemd/app/index.html -------------------------------------------------------------------------------- /Chapter15/livemd/app/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter15/livemd/app/index.js -------------------------------------------------------------------------------- /Chapter15/livemd/app/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter15/livemd/app/package.json -------------------------------------------------------------------------------- /Chapter15/livemd/app/styles.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter15/livemd/app/styles.css -------------------------------------------------------------------------------- /Chapter15/livemd/app/webpack.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter15/livemd/app/webpack.config.js -------------------------------------------------------------------------------- /Chapter15/livemd/app/yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter15/livemd/app/yarn.lock -------------------------------------------------------------------------------- /Chapter15/livemd/run.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter15/livemd/run.sh -------------------------------------------------------------------------------- /Chapter15/livemd/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter15/livemd/src/lib.rs -------------------------------------------------------------------------------- /Chapter16/hews/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter16/hews/Cargo.lock -------------------------------------------------------------------------------- /Chapter16/hews/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter16/hews/Cargo.toml -------------------------------------------------------------------------------- /Chapter16/hews/src/app.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter16/hews/src/app.rs -------------------------------------------------------------------------------- /Chapter16/hews/src/hackernews.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter16/hews/src/hackernews.rs -------------------------------------------------------------------------------- /Chapter16/hews/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter16/hews/src/main.rs -------------------------------------------------------------------------------- /Chapter17/buggie/.vscode/launch.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter17/buggie/.vscode/launch.json -------------------------------------------------------------------------------- /Chapter17/buggie/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "buggie" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /Chapter17/buggie/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter17/buggie/Cargo.toml -------------------------------------------------------------------------------- /Chapter17/buggie/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter17/buggie/src/main.rs -------------------------------------------------------------------------------- /Chapter17/rr_demo/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | -------------------------------------------------------------------------------- /Chapter17/rr_demo/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter17/rr_demo/Cargo.lock -------------------------------------------------------------------------------- /Chapter17/rr_demo/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter17/rr_demo/Cargo.toml -------------------------------------------------------------------------------- /Chapter17/rr_demo/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/Chapter17/rr_demo/src/main.rs -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Mastering-RUST-Second-Edition/HEAD/README.md --------------------------------------------------------------------------------