MCPcopy Create free account

hub / github.com/derekbanas/Rust-Tutorial / functions

Functions24 in github.com/derekbanas/Rust-Tutorial

↓ 1 callersFunctionchange_string
(name: &mut String)
main.rs:134
↓ 1 callersFunctioncustomer
(the_bank: Arc<Mutex<Bank>>)
main.rs:1072
↓ 1 callersFunctionget_2
Return multiple values
main.rs:121
↓ 1 callersFunctionget_sum
You can pass arguments to functions
main.rs:103
↓ 1 callersMethodleft
(mut self, node: TreeNode<T>)
main.rs:939
↓ 1 callersFunctionorder_food
This is the public function that allows our other file access
mod.rs:56
↓ 1 callersFunctionprint_return_str
(x: String)
main.rs:129
↓ 1 callersFunctionprint_str
(x: String)
main.rs:125
↓ 1 callersMethodright
(mut self, node: TreeNode<T>)
main.rs:944
↓ 1 callersFunctionsay_hello
----- FUNCTIONS ----- You can define functions before or after main
main.rs:98
↓ 1 callersFunctionseat_at_table
This function is private
mod.rs:32
↓ 1 callersFunctionserve_customer
(cust_pizza: super::Pizza)
mod.rs:48
↓ 1 callersFunctiontake_order
Making help_customer public doesn't make this child function public so we must also make it public
mod.rs:38
↓ 1 callersFunctionwithdraw
(the_bank: &Arc<Mutex<Bank>>, amt:f32)
main.rs:1059
Methodarea
self allows us to refer to parameters for this struct
main.rs:706
Functionget_sum_2
Return a value
main.rs:108
Functionget_sum_3
You can also use return
main.rs:116
Functionget_sum_gen
We get 2 generic types of the same type and return that same type
main.rs:157
Methodis_weekend
(&self)
main.rs:476
Methodlunch
(topping: &str)
mod.rs:20
Functionmain
()
main.rs:161
Methodnew
Constructor
main.rs:701
Functionsum_list
This function sums values in a list (Receives reference to list)
main.rs:140
Functionuse_func
You can pass closures to functions
main.rs:861