Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/buraksenyurt/rust-training
/ functions
Functions
216 in github.com/buraksenyurt/rust-training
⨍
Functions
216
◇
Types & classes
54
↓ 6 callers
Function
get_discount_amount
(unit_price: f64, rate: f64)
S16_testing/src/accounting.rs:1
↓ 4 callers
Function
log_any
Örnek bir generic fonksiyon. parametre olarak gelen object değişkeni T türünden olabilir. T için herhangibir kısıt belirtilmediğinden herhangibi
S11_generics/src/main.rs:47
↓ 4 callers
Method
validate_nickname
(&self, nick_name: &str)
S16_testing/src/membership.rs:4
↓ 3 callers
Method
add
(self, other: Point<T>)
S11_generics/src/main.rs:80
↓ 3 callers
Function
fetch_data_async
(url: &str)
S23_asynchronous_programming/src/api_sample.rs:26
↓ 3 callers
Function
fetch_metrics
(service_name: &str, tx: mpsc::Sender<String>)
S23_asynchronous_programming/src/metric_sample.rs:23
↓ 3 callers
Function
fetch_sensor_data
(sensor_id: u32, interval: u64)
S23_asynchronous_programming/src/iot_sample.rs:13
↓ 3 callers
Function
is_prime
Sayının asal olup olmadığını kontrol eden fonksiyon
S22_parallelism/src/main.rs:35
↓ 3 callers
Method
pay
(&self, amount: f64)
S12_traits/src/main.rs:122
↓ 3 callers
Function
run
()
S23_asynchronous_programming/src/iot_sample.rs:5
↓ 3 callers
Function
trim_last
(context: &mut String)
S06_ownership/src/main.rs:109
↓ 2 callers
Method
activate
(&mut self)
S12_traits/src/main.rs:84
↓ 2 callers
Method
activate
(&mut self)
S09_enums/src/main.rs:77
↓ 2 callers
Method
add_friend
(self: &Rc<Self>, friend: Rc<Player>)
S18_smart_pointers/src/rc_scenario.rs:142
↓ 2 callers
Method
allocate
Bu fonksiyon bir bellek bölgesini ayırır ve başlangıç adresini raw pointer olarak döner. Buradaki raw pointer mutable'dır. */
S26_unsafe_coding/src/advanced.rs:57
↓ 2 callers
Method
change_level
(&mut self, level: Level)
S09_enums/src/main.rs:74
↓ 2 callers
Function
create_report
(title: String)
S09_enums/src/main.rs:28
↓ 2 callers
Method
deactivate
(&mut self)
S12_traits/src/main.rs:87
↓ 2 callers
Function
draw
(a, b, c, x_min, x_max, steps)
meth-leb/www/index.js:29
↓ 2 callers
Function
drawAxes
()
meth-leb/www/index.js:12
↓ 2 callers
Function
find_account
Referans olarak gelen vektör içerisinde id bilgisine sahip Account değişkenini arayan bu fonksiyon Option<&T> dönmektedir. Metodun kullanıldığı
S10_pattern_matching/src/main.rs:168
↓ 2 callers
Function
get_alignment
Sistemin 32 veya 64 bit olmasına göre gerekli olan byte hizalama değerini aldığımı fonksiyon */
S26_unsafe_coding/src/advanced.rs:20
↓ 2 callers
Function
load_level
(name: &String)
S06_ownership/src/main.rs:105
↓ 2 callers
Function
process_transaction
(balance: &mut f64, transaction: CustomerTransaction)
S10_pattern_matching/src/main.rs:117
↓ 2 callers
Function
read
Bu fonksiyon ise path ile gelen dosya içeriğini okuyup geriye döndürür. Metin tabanlı dosyalar için ele alınan bir yöntemdir. */
S24_file_io/src/basics.rs:23
↓ 2 callers
Function
run
()
S26_unsafe_coding/src/advanced.rs:88
↓ 2 callers
Function
run
()
S24_file_io/src/basics.rs:33
↓ 2 callers
Function
start_sample
Aşağıdaki fonksiyon parametre olarak Service trait' ini uygulayan değişkenler ile çalışabilmektedir. */
S12_traits/src/main.rs:43
↓ 2 callers
Function
update_players_system
(world: &mut GameWorld, mut f: F)
S17_closures/src/scenario.rs:22
↓ 1 callers
Function
accelerate
(mut speed: Velocity)
S13_built_in_traits/src/main.rs:87
↓ 1 callers
Function
add
(left: u64, right: u64)
S16_testing/src/lib.rs:29
↓ 1 callers
Function
analyze_logs
(file_path: &str, num_threads: usize)
S24_file_io/src/advanced.rs:13
↓ 1 callers
Function
append_game
Aşağıdaki metot games.dat isimli bir dosya oluşturur. Sistemde varsa append modda açar ve gelen içeriği sonuna ekleyerek devam eder. */
S24_file_io/src/basics.rs:10
↓ 1 callers
Function
approve_application
(account_owner: &str)
S15_error_handling/src/main.rs:108
↓ 1 callers
Function
calc_factorial
(n: u64)
S19_threads/src/basic.rs:74
↓ 1 callers
Function
calculate_parabola
( a: f64, b: f64, c: f64, x_min: f64, x_max: f64, steps: usize, )
meth-leb/src/lib.rs:22
↓ 1 callers
Method
call
(&self)
S13_built_in_traits/src/main.rs:251
↓ 1 callers
Function
check_department
(department: String)
S06_ownership/src/main.rs:117
↓ 1 callers
Function
check_exam
(student: Student)
S10_pattern_matching/src/main.rs:99
↓ 1 callers
Function
check_exam_score
(point: i32)
S05_control_flows/src/main.rs:57
↓ 1 callers
Function
check_status
()
S10_pattern_matching/src/main.rs:47
↓ 1 callers
Method
deactivate
(&mut self)
S09_enums/src/main.rs:80
↓ 1 callers
Function
double_usage
Aşağıdaki metod verilen teriman komutuna göre şöyle çalışır. logs.dat dosyası cat uygulaması ile açılır, bu uygulama dosyanın içeriğini okur ve
S25_streams/src/basics.rs:123
↓ 1 callers
Method
draw
(&self)
S12_traits/src/main.rs:145
↓ 1 callers
Function
draw_shapes
draw_shape fonksiyonu dikkat edileceği üzre &dyn Draw türünden bir parametre almaktadır. Buna göre bu fonksiyona Draw trait'ini implemente eden her
S12_traits/src/main.rs:167
↓ 1 callers
Function
fetch_credit_score
(account_owner: &str)
S15_error_handling/src/main.rs:97
↓ 1 callers
Function
find_another_total
()
S21_macros/src/main.rs:34
↓ 1 callers
Function
find_primes_scenario
Kendi sistemimde seri hesaplama yani tek thread ile asal sayı bulma operasyonu 4 dakika 41 saniye kadar sürdü. Thread'leri kendimiz manuel açar
S22_parallelism/src/main.rs:97
↓ 1 callers
Function
find_total
()
S21_macros/src/main.rs:21
↓ 1 callers
Method
free
(&mut self)
S26_unsafe_coding/src/advanced.rs:68
↓ 1 callers
Function
generate_random_file
Aşağıdaki fonksiyonun amacı basitçe büyük miktarda veri içeren bir log dosyası üretmektir. Senaryo gereği messages isimli vektörden rastgele içeri
S24_file_io/src/data_generator.rs:12
↓ 1 callers
Function
get_app_settings
()
S08_lifetimes/src/main.rs:113
↓ 1 callers
Function
get_evens
(numbers: &Vec<i32>)
S04_functions/src/main.rs:48
↓ 1 callers
Function
get_odds
(numbers: &[i32])
S04_functions/src/main.rs:58
↓ 1 callers
Function
get_random_numbers
(max_limit: u8)
S05_control_flows/src/main.rs:44
↓ 1 callers
Function
get_upper_counts
(context: &String)
S06_ownership/src/main.rs:95
↓ 1 callers
Function
greet
(name: &str)
S04_functions/src/main.rs:24
↓ 1 callers
Function
handle_ping
Bu örnekte TcpStream ve TcpListener kullanılarak ilkel bir web server işletiliyor. İstemciler http://localhost:5001/ping adresine bir talepte bulu
S25_streams/src/ping_server.rs:19
↓ 1 callers
Function
handle_request
(mut stream: TcpStream)
S25_streams/src/file_server.rs:24
↓ 1 callers
Function
handle_request
(mut stream: TcpStream, value_store: Arc<Mutex<HashMap<String, String>>>)
S25_streams/src/kv_server.rs:23
↓ 1 callers
Function
hello_rc
()
S18_smart_pointers/src/rc_scenario.rs:10
↓ 1 callers
Function
load_accounts
()
S10_pattern_matching/src/main.rs:172
↓ 1 callers
Function
load_games
()
S17_closures/src/repository.rs:8
↓ 1 callers
Function
main
()
meth-leb/www/index.js:3
↓ 1 callers
Function
move_position
(mut x: f32, mut y: f32, acceleration: f32)
S04_functions/src/main.rs:42
↓ 1 callers
Function
move_rule
()
S06_ownership/src/main.rs:130
↓ 1 callers
Function
move_rule_with_clone
()
S06_ownership/src/main.rs:141
↓ 1 callers
Function
only_one_mutable
()
S06_ownership/src/main.rs:157
↓ 1 callers
Function
parallel_find_primes
(numbers: Vec<u64>, num_threads: usize)
S22_parallelism/src/main.rs:47
↓ 1 callers
Function
ping
Sembolik olarak bir servise gidipte rastgele HttpStatus bilgisi döndüren fonksiyon
S10_pattern_matching/src/main.rs:72
↓ 1 callers
Function
poisoning_case_logging
Aşağıdaki senaryoda da Thread Poisoning durumu söz konusudur ancak biraz daha gerçekçi bir durum ele alınmaktadır. Birden fazla thread'in bir log d
S20_channels/src/problems.rs:139
↓ 1 callers
Method
print
(&self)
S18_smart_pointers/src/rc_scenario.rs:146
↓ 1 callers
Function
print_all_to_upper
(names: Vec<&str>)
S04_functions/src/main.rs:28
↓ 1 callers
Function
print_games
(games: &Vec<Game>)
S17_closures/src/main.rs:49
↓ 1 callers
Function
print_greetings
()
S04_functions/src/main.rs:20
↓ 1 callers
Function
print_thread_count
()
S22_parallelism/src/main.rs:13
↓ 1 callers
Function
read
()
S25_streams/src/basics.rs:65
↓ 1 callers
Function
read_lines_with_pause
Aşağıdaki fonksiyon dosya içeriğini sayfa sayfa okumak için kullanılır. Dosya içeriği yine bir buffer üzerinden ele alınır ancak page_size değerin
S24_file_io/src/data_generator.rs:62
↓ 1 callers
Function
recursive_sample
()
S18_smart_pointers/src/boxing.rs:52
↓ 1 callers
Method
resize
(&mut self, width: f32, height: f32)
S07_structs/src/main.rs:71
↓ 1 callers
Function
run
()
S17_closures/src/scenario.rs:46
↓ 1 callers
Function
run
()
S25_streams/src/basics.rs:137
↓ 1 callers
Function
run_correctly
()
S19_threads/src/arc_and_mutex.rs:36
↓ 1 callers
Function
run_rc
()
S18_smart_pointers/src/rc_scenario.rs:154
↓ 1 callers
Function
search_book
Bu fonksiyon parametre olarak gelen title değişkeninin sahipliğini de alır (ownership) Dolayısıyla metottan çıkılırken scope kuralı gereği title de
S06_ownership/src/main.rs:126
↓ 1 callers
Function
send_money
(money: f32)
S06_ownership/src/main.rs:113
↓ 1 callers
Function
simple_boxing
()
S18_smart_pointers/src/boxing.rs:1
↓ 1 callers
Function
spawn_random_user
(name: String)
S07_structs/src/main.rs:37
↓ 1 callers
Function
start_sample2
Bazı durumlarda Trait bildirimi generic tanımlama üzerinden de yapılabilir
S12_traits/src/main.rs:50
↓ 1 callers
Function
sum
()
S21_macros/src/main.rs:51
↓ 1 callers
Function
update_score_system
(world: &GameWorld, mut f: F)
S17_closures/src/scenario.rs:31
Function
add
()
S14_modules/src/repository.rs:1
Method
area
(&self)
S07_structs/src/main.rs:65
Function
borrow
()
S14_modules/src/borrow_system.rs:1
Function
deadlock_case
()
S20_channels/src/problems.rs:15
Function
deadlock_case_banking
Aşağıdaki senaryoda da bir deadlock durumu oluşmaktadır. Hesap bilgileri Mutex'ler ile korunu ve arka arkaya açılan iki thread bu mutex'ler ile
S20_channels/src/problems.rs:53
Method
default
()
S13_built_in_traits/src/main.rs:174
Function
do_with_standard
()
S20_channels/src/scenarios.rs:60
Function
do_with_tokio
()
S20_channels/src/scenarios.rs:88
Function
double_it
(value: i32)
S04_functions/src/main.rs:38
next →
1–100 of 216, ranked by callers