MCPcopy Create free account

hub / github.com/FrancescoXX/rust-crush-bootcamp / functions

Functions32 in github.com/FrancescoXX/rust-crush-bootcamp

↓ 4 callersFunctiondivide
This function "might" fail, so it returns a `Result`.
src/bin/18_error_handling.rs:19
↓ 4 callersFunctionprocess_message
A function that uses `match` on our `Message` enum
src/bin/17_match.rs:20
↓ 1 callersFunctionadd_five
Functions with Return Values - We declare the return type after an arrow `->`.
src/bin/08_functions.rs:29
↓ 1 callersFunctionanother_function
function with no parameters and no return value.
src/bin/08_functions.rs:14
↓ 1 callersFunctioncalculate_length
(s: &String)
src/bin/10_borrowing_references.rs:12
↓ 1 callersFunctioncalculate_length
(s: String)
src/bin/09_ownership_moving.rs:33
↓ 1 callersFunctionprint_labeled_measurement
function with multiple parameters.
src/bin/08_functions.rs:24
↓ 1 callersFunctionprint_value
function that takes one parameter.
src/bin/08_functions.rs:19
Functionchange
This function "mutably borrows" a String
src/bin/10_borrowing_references.rs:68
Functionmain
()
src/main.rs:14
Functionmain
()
src/bin/01_hello_cargo.rs:11
Functionmain
--- Primitive Types: Tuples --- 🔑 Key Concepts: - Groups multiple values of different types. - Have a fixed length (size cannot change). - Access el
src/bin/07_tuples.rs:9
Functionmain
()
src/bin/14_control_flow_for.rs:10
Functionmain
()
src/bin/16_enums.rs:38
Functionmain
--- `if` Expressions --- 🔑 Key Concepts: - Used for conditional branching. - Syntax: `if condition { ... } else if condition2 { ... } else { ... }`.
src/bin/11_control_flow_if.rs:11
Functionmain
The `main` Function is the entry point. It takes no parameters and returns nothing.
src/bin/08_functions.rs:38
Functionmain
()
src/bin/15_structs.rs:20
Functionmain
()
src/bin/10_borrowing_references.rs:18
Functionmain
()
src/bin/20_collections_strings.rs:12
Functionmain
()
src/bin/03_constants.rs:15
Functionmain
Variables 🔑 Key Concepts: - Declared using `let`. - Immutable by default; they cannot be changed after being assigned. - Use the `mut` keyword to ma
src/bin/02_variables.rs:10
Functionmain
--- Primitive Types: Scalar --- 🔑 Key Concepts: - They Represent a single value. - 4 main types: Integers, Floats, Booleans, Characters. - Staticall
src/bin/05_primitive_scalar_types.rs:9
Functionmain
()
src/bin/09_ownership_moving.rs:10
Functionmain
()
src/bin/21_collections_hashmaps.rs:17
Functionmain
()
src/bin/19_collections_vectors.rs:14
Functionmain
()
src/bin/04_shadowing.rs:11
Functionmain
()
src/bin/12_control_flow_loop.rs:9
Functionmain
()
src/bin/13_control_flow_while.rs:9
Functionmain
()
src/bin/17_match.rs:41
Functionmain
()
src/bin/18_error_handling.rs:27
Functionmain
--- Primitive Types: Arrays --- 🔑 Key Concepts: - Groups multiple values of the same type. - Have fixed length (size cannot change). - Type is annot
src/bin/06_arrays.rs:10
Functiontry_divide
the ? operator (brief mention)
src/bin/18_error_handling.rs:76