Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PacktPublishing/Rust-Standard-Library-Cookbook
/ functions
Functions
272 in github.com/PacktPublishing/Rust-Standard-Library-Cookbook
⨍
Functions
272
◇
Types & classes
61
↓ 19 callers
Method
push
(&mut self, item: T)
Chapter02/src/bin/own_iterator.rs:50
↓ 17 callers
Method
next
(&mut self)
Chapter02/src/bin/own_iterator.rs:27
↓ 12 callers
Method
read
(&self, id: u32)
Chapter09/src/bin/making_requests.rs:68
↓ 8 callers
Method
create
(&self, post: &NewPost)
Chapter09/src/bin/making_requests.rs:63
↓ 7 callers
Method
lock
(&self)
Chapter07/src/bin/atomic.rs:122
↓ 7 callers
Method
start_send
(&mut self, op: Option<T>)
Chapter08/src/bin/sinks.rs:91
↓ 6 callers
Method
build
The final method actually constructs our object
Chapter01/src/bin/builder.rs:109
↓ 6 callers
Method
poll
(&mut self, _cx: &mut Context)
Chapter08/src/bin/pool.rs:50
↓ 5 callers
Method
flush
(&self)
Chapter06/src/bin/custom_logger.rs:46
↓ 5 callers
Method
print
This method is just here for illustrative purposes
Chapter01/src/bin/builder.rs:44
↓ 4 callers
Method
as_ref
(&self)
Chapter05/src/bin/conversion.rs:38
↓ 4 callers
Function
new_status
(unit: &'static str, status: Status)
Chapter08/src/bin/pool.rs:57
↓ 4 callers
Method
poll_next
(&mut self, _cx: &mut task::Context)
Chapter08/src/bin/streams.rs:20
↓ 4 callers
Function
publish_news
Send news to every customer that wants to receive them
Chapter05/src/bin/interior_mutability.rs:19
↓ 3 callers
Function
hello_world
(input: TokenStream)
Chapter05/chapter-five-derive/src/lib.rs:11
↓ 3 callers
Method
poll_ready
(&mut self, _cx: &mut Context)
Chapter08/src/bin/sinks.rs:101
↓ 3 callers
Function
print_single_line
(text: &str)
Chapter01/src/bin/stdin.rs:20
↓ 3 callers
Function
send_file_or_404
Send a future containing a response with the requested file or a 404 page
Chapter09/src/bin/file_server.rs:56
↓ 3 callers
Function
sum_bucket
This is the function that will be executed in the threads
Chapter01/src/bin/parallelism.rs:56
↓ 3 callers
Method
unlock
(&self)
Chapter06/src/bin/raii.rs:28
↓ 2 callers
Method
add_child_nodes
(&mut self, a: Node<T>, b: Node<T>)
Chapter05/src/bin/boxing.rs:27
↓ 2 callers
Function
async_add_points
(player: &mut Player, points: u32)
Chapter08/src/bin/returning.rs:89
↓ 2 callers
Method
cheese
(mut self, val: bool)
Chapter01/src/bin/builder.rs:95
↓ 2 callers
Method
clear
Implementing a "clear" method can be useful
Chapter05/src/bin/bit_fields.rs:19
↓ 2 callers
Function
display_scoreboard
(players: Vec<&Player>)
Chapter08/src/bin/returning.rs:103
↓ 2 callers
Method
force_flush
(&mut self)
Chapter08/src/bin/sinks.rs:127
↓ 2 callers
Function
inner
(n: u32, penultimate: u32, last: u32)
Chapter10/src/bin/benchmarking.rs:33
↓ 2 callers
Function
print_env_var
(key: &str)
Chapter01/src/bin/env_vars.rs:24
↓ 2 callers
Function
read_file
(path: &str)
Chapter03/src/bin/text_files.rs:37
↓ 2 callers
Function
try_to_send_file
(file: &str)
Chapter09/src/bin/file_server.rs:72
↓ 2 callers
Method
vegetarian
(mut self, val: bool)
Chapter01/src/bin/builder.rs:91
↓ 2 callers
Method
wake
(_: &Arc<Self>)
Chapter08/src/bin/bilocks.rs:13
↓ 2 callers
Function
write_file
(path: &str, content: &str)
Chapter03/src/bin/text_files.rs:56
↓ 1 callers
Method
add_connection
(&self, ip: Ipv6Addr)
Chapter07/src/bin/connection_handler.rs:41
↓ 1 callers
Method
add_points
(&mut self, points: u32)
Chapter08/src/bin/returning.rs:52
↓ 1 callers
Function
append_and_read
(path: &str, content: &str)
Chapter03/src/bin/text_files.rs:76
↓ 1 callers
Function
append_file
(path: &str, content: &str)
Chapter03/src/bin/text_files.rs:67
↓ 1 callers
Method
area
(&self)
Chapter07/src/bin/join.rs:10
↓ 1 callers
Method
bacon
(mut self, val: bool)
Chapter01/src/bin/builder.rs:99
↓ 1 callers
Function
by_cloning
()
Chapter01/src/bin/concat.rs:17
↓ 1 callers
Function
by_moving
()
Chapter01/src/bin/concat.rs:7
↓ 1 callers
Function
by_mutating
()
Chapter01/src/bin/concat.rs:27
↓ 1 callers
Method
can_add_points
(&mut self)
Chapter08/src/bin/returning.rs:43
↓ 1 callers
Function
caps_words_iter
Via trait objects we can return any iterator
Chapter05/src/bin/boxing.rs:90
↓ 1 callers
Function
caps_words_iter
Any iterator can be returned as an abstract return type
Chapter10/src/bin/return_abstract.rs:37
↓ 1 callers
Function
catch_unwind
()
Chapter08/src/bin/errors.rs:80
↓ 1 callers
Function
chaining
()
Chapter08/src/bin/combinators.rs:118
↓ 1 callers
Function
channel_buffer
()
Chapter08/src/bin/streams.rs:159
↓ 1 callers
Function
channel_error
()
Chapter08/src/bin/streams.rs:130
↓ 1 callers
Function
channel_threads
()
Chapter08/src/bin/streams.rs:106
↓ 1 callers
Function
channel_threads_blocking
()
Chapter08/src/bin/streams.rs:200
↓ 1 callers
Function
channel_unbounded
()
Chapter08/src/bin/streams.rs:222
↓ 1 callers
Function
check_if_closed
()
Chapter08/src/bin/oneshot.rs:39
↓ 1 callers
Function
check_if_ready
()
Chapter08/src/bin/oneshot.rs:48
↓ 1 callers
Method
client_count
(&self)
Chapter07/src/bin/connection_handler.rs:34
↓ 1 callers
Function
create_animal
The impl trait syntax allows us to use abstract return types This means that we don't specify which exact struct we return but which trait(s) it imple
Chapter10/src/bin/return_abstract.rs:32
↓ 1 callers
Function
create_multiplier
(a: i32)
Chapter05/src/bin/boxing.rs:105
↓ 1 callers
Function
create_multiplier
Same goes for closures
Chapter10/src/bin/return_abstract.rs:43
↓ 1 callers
Function
decode_bytes
(bytes: &[u8])
Chapter03/src/bin/compression.rs:68
↓ 1 callers
Function
decode_file
(file: &mut Read)
Chapter03/src/bin/compression.rs:84
↓ 1 callers
Method
delete
(&self, id: u32)
Chapter09/src/bin/making_requests.rs:80
↓ 1 callers
Method
do_sound
(&self)
Chapter10/src/bin/return_abstract.rs:9
↓ 1 callers
Function
easy_public_func
Easily written but cumbersome to use
Chapter05/src/bin/conversion.rs:88
↓ 1 callers
Method
enabled
(&self, metadata: &Metadata)
Chapter06/src/bin/custom_logger.rs:18
↓ 1 callers
Function
encode_bytes
(bytes: &[u8])
Chapter03/src/bin/compression.rs:61
↓ 1 callers
Function
encode_file
(file: &mut Read)
Chapter03/src/bin/compression.rs:76
↓ 1 callers
Function
ergonomic_public_func
This is quite some extra typing, so it's only worth to do for public functions with many optional parameters
Chapter05/src/bin/conversion.rs:100
↓ 1 callers
Function
err_into
()
Chapter08/src/bin/errors.rs:67
↓ 1 callers
Function
err_into_example
()
Chapter08/src/bin/errors.rs:20
↓ 1 callers
Function
expensive_operation
()
Chapter06/src/bin/logging.rs:33
↓ 1 callers
Function
extract_day
Local static
Chapter05/src/bin/lazy_static.rs:26
↓ 1 callers
Function
fanout
()
Chapter08/src/bin/sinks.rs:69
↓ 1 callers
Function
fast_fibonacci_recursive
(n: u32)
Chapter10/src/bin/benchmarking.rs:43
↓ 1 callers
Function
fibonacci
(n: u32)
Chapter07/src/bin/join.rs:34
↓ 1 callers
Function
fibonacci
()
Chapter10/src/bin/generator.rs:64
↓ 1 callers
Function
fibonacci
()
Chapter02/src/bin/own_iterator.rs:16
↓ 1 callers
Function
fibonacci_imperative
(n: u32)
Chapter10/src/bin/benchmarking.rs:14
↓ 1 callers
Function
fill_some_data
(entry: VacantEntry<&str>)
Chapter02/src/bin/slab.rs:44
↓ 1 callers
Function
flatten
()
Chapter08/src/bin/combinators.rs:87
↓ 1 callers
Function
fuse
()
Chapter08/src/bin/combinators.rs:94
↓ 1 callers
Function
get_content_type
(file: &str)
Chapter09/src/bin/file_server.rs:147
↓ 1 callers
Function
get_name_attribute
(ast: &syn::DeriveInput)
Chapter05/chapter-five-derive/src/lib.rs:44
↓ 1 callers
Function
handle_echo
(req: Request)
Chapter09/src/bin/echo_server_with_routing.rs:37
↓ 1 callers
Function
handle_get_file
(file: &str)
Chapter09/src/bin/file_server.rs:42
↓ 1 callers
Function
handle_invalid_method
()
Chapter09/src/bin/file_server.rs:47
↓ 1 callers
Function
handle_not_found
()
Chapter09/src/bin/echo_server_with_routing.rs:43
↓ 1 callers
Function
handle_root
()
Chapter09/src/bin/file_server.rs:37
↓ 1 callers
Function
handle_root
()
Chapter09/src/bin/echo_server_with_routing.rs:29
↓ 1 callers
Function
has_file_name
(entry: &DirEntry, name: &str)
Chapter03/src/bin/traverse_files.rs:67
↓ 1 callers
Function
impl_hello_world
(ast: &syn::DeriveInput)
Chapter05/chapter-five-derive/src/lib.rs:25
↓ 1 callers
Function
inspect
()
Chapter08/src/bin/combinators.rs:111
↓ 1 callers
Function
is_hidden
(entry: &DirEntry)
Chapter03/src/bin/traverse_files.rs:55
↓ 1 callers
Function
iterate_streams
()
Chapter08/src/bin/streams.rs:61
↓ 1 callers
Function
join_all_example
()
Chapter08/src/bin/combinators.rs:15
↓ 1 callers
Function
local_nested
()
Chapter08/src/bin/pool.rs:111
↓ 1 callers
Function
local_spawns_completed
()
Chapter08/src/bin/pool.rs:92
↓ 1 callers
Function
local_until
()
Chapter08/src/bin/pool.rs:61
↓ 1 callers
Method
lock
(&self)
Chapter06/src/bin/raii.rs:25
↓ 1 callers
Function
manual_flush
()
Chapter08/src/bin/sinks.rs:137
↓ 1 callers
Function
map_error
()
Chapter08/src/bin/errors.rs:59
next →
1–100 of 272, ranked by callers