MCPcopy Create free account

hub / github.com/PacktPublishing/Rust-Standard-Library-Cookbook / functions

Functions272 in github.com/PacktPublishing/Rust-Standard-Library-Cookbook

↓ 19 callersMethodpush
(&mut self, item: T)
Chapter02/src/bin/own_iterator.rs:50
↓ 17 callersMethodnext
(&mut self)
Chapter02/src/bin/own_iterator.rs:27
↓ 12 callersMethodread
(&self, id: u32)
Chapter09/src/bin/making_requests.rs:68
↓ 8 callersMethodcreate
(&self, post: &NewPost)
Chapter09/src/bin/making_requests.rs:63
↓ 7 callersMethodlock
(&self)
Chapter07/src/bin/atomic.rs:122
↓ 7 callersMethodstart_send
(&mut self, op: Option<T>)
Chapter08/src/bin/sinks.rs:91
↓ 6 callersMethodbuild
The final method actually constructs our object
Chapter01/src/bin/builder.rs:109
↓ 6 callersMethodpoll
(&mut self, _cx: &mut Context)
Chapter08/src/bin/pool.rs:50
↓ 5 callersMethodflush
(&self)
Chapter06/src/bin/custom_logger.rs:46
↓ 5 callersMethodprint
This method is just here for illustrative purposes
Chapter01/src/bin/builder.rs:44
↓ 4 callersMethodas_ref
(&self)
Chapter05/src/bin/conversion.rs:38
↓ 4 callersFunctionnew_status
(unit: &'static str, status: Status)
Chapter08/src/bin/pool.rs:57
↓ 4 callersMethodpoll_next
(&mut self, _cx: &mut task::Context)
Chapter08/src/bin/streams.rs:20
↓ 4 callersFunctionpublish_news
Send news to every customer that wants to receive them
Chapter05/src/bin/interior_mutability.rs:19
↓ 3 callersFunctionhello_world
(input: TokenStream)
Chapter05/chapter-five-derive/src/lib.rs:11
↓ 3 callersMethodpoll_ready
(&mut self, _cx: &mut Context)
Chapter08/src/bin/sinks.rs:101
↓ 3 callersFunctionprint_single_line
(text: &str)
Chapter01/src/bin/stdin.rs:20
↓ 3 callersFunctionsend_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 callersFunctionsum_bucket
This is the function that will be executed in the threads
Chapter01/src/bin/parallelism.rs:56
↓ 3 callersMethodunlock
(&self)
Chapter06/src/bin/raii.rs:28
↓ 2 callersMethodadd_child_nodes
(&mut self, a: Node<T>, b: Node<T>)
Chapter05/src/bin/boxing.rs:27
↓ 2 callersFunctionasync_add_points
(player: &mut Player, points: u32)
Chapter08/src/bin/returning.rs:89
↓ 2 callersMethodcheese
(mut self, val: bool)
Chapter01/src/bin/builder.rs:95
↓ 2 callersMethodclear
Implementing a "clear" method can be useful
Chapter05/src/bin/bit_fields.rs:19
↓ 2 callersFunctiondisplay_scoreboard
(players: Vec<&Player>)
Chapter08/src/bin/returning.rs:103
↓ 2 callersMethodforce_flush
(&mut self)
Chapter08/src/bin/sinks.rs:127
↓ 2 callersFunctioninner
(n: u32, penultimate: u32, last: u32)
Chapter10/src/bin/benchmarking.rs:33
↓ 2 callersFunctionprint_env_var
(key: &str)
Chapter01/src/bin/env_vars.rs:24
↓ 2 callersFunctionread_file
(path: &str)
Chapter03/src/bin/text_files.rs:37
↓ 2 callersFunctiontry_to_send_file
(file: &str)
Chapter09/src/bin/file_server.rs:72
↓ 2 callersMethodvegetarian
(mut self, val: bool)
Chapter01/src/bin/builder.rs:91
↓ 2 callersMethodwake
(_: &Arc<Self>)
Chapter08/src/bin/bilocks.rs:13
↓ 2 callersFunctionwrite_file
(path: &str, content: &str)
Chapter03/src/bin/text_files.rs:56
↓ 1 callersMethodadd_connection
(&self, ip: Ipv6Addr)
Chapter07/src/bin/connection_handler.rs:41
↓ 1 callersMethodadd_points
(&mut self, points: u32)
Chapter08/src/bin/returning.rs:52
↓ 1 callersFunctionappend_and_read
(path: &str, content: &str)
Chapter03/src/bin/text_files.rs:76
↓ 1 callersFunctionappend_file
(path: &str, content: &str)
Chapter03/src/bin/text_files.rs:67
↓ 1 callersMethodarea
(&self)
Chapter07/src/bin/join.rs:10
↓ 1 callersMethodbacon
(mut self, val: bool)
Chapter01/src/bin/builder.rs:99
↓ 1 callersFunctionby_cloning
()
Chapter01/src/bin/concat.rs:17
↓ 1 callersFunctionby_moving
()
Chapter01/src/bin/concat.rs:7
↓ 1 callersFunctionby_mutating
()
Chapter01/src/bin/concat.rs:27
↓ 1 callersMethodcan_add_points
(&mut self)
Chapter08/src/bin/returning.rs:43
↓ 1 callersFunctioncaps_words_iter
Via trait objects we can return any iterator
Chapter05/src/bin/boxing.rs:90
↓ 1 callersFunctioncaps_words_iter
Any iterator can be returned as an abstract return type
Chapter10/src/bin/return_abstract.rs:37
↓ 1 callersFunctioncatch_unwind
()
Chapter08/src/bin/errors.rs:80
↓ 1 callersFunctionchaining
()
Chapter08/src/bin/combinators.rs:118
↓ 1 callersFunctionchannel_buffer
()
Chapter08/src/bin/streams.rs:159
↓ 1 callersFunctionchannel_error
()
Chapter08/src/bin/streams.rs:130
↓ 1 callersFunctionchannel_threads
()
Chapter08/src/bin/streams.rs:106
↓ 1 callersFunctionchannel_threads_blocking
()
Chapter08/src/bin/streams.rs:200
↓ 1 callersFunctionchannel_unbounded
()
Chapter08/src/bin/streams.rs:222
↓ 1 callersFunctioncheck_if_closed
()
Chapter08/src/bin/oneshot.rs:39
↓ 1 callersFunctioncheck_if_ready
()
Chapter08/src/bin/oneshot.rs:48
↓ 1 callersMethodclient_count
(&self)
Chapter07/src/bin/connection_handler.rs:34
↓ 1 callersFunctioncreate_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 callersFunctioncreate_multiplier
(a: i32)
Chapter05/src/bin/boxing.rs:105
↓ 1 callersFunctioncreate_multiplier
Same goes for closures
Chapter10/src/bin/return_abstract.rs:43
↓ 1 callersFunctiondecode_bytes
(bytes: &[u8])
Chapter03/src/bin/compression.rs:68
↓ 1 callersFunctiondecode_file
(file: &mut Read)
Chapter03/src/bin/compression.rs:84
↓ 1 callersMethoddelete
(&self, id: u32)
Chapter09/src/bin/making_requests.rs:80
↓ 1 callersMethoddo_sound
(&self)
Chapter10/src/bin/return_abstract.rs:9
↓ 1 callersFunctioneasy_public_func
Easily written but cumbersome to use
Chapter05/src/bin/conversion.rs:88
↓ 1 callersMethodenabled
(&self, metadata: &Metadata)
Chapter06/src/bin/custom_logger.rs:18
↓ 1 callersFunctionencode_bytes
(bytes: &[u8])
Chapter03/src/bin/compression.rs:61
↓ 1 callersFunctionencode_file
(file: &mut Read)
Chapter03/src/bin/compression.rs:76
↓ 1 callersFunctionergonomic_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 callersFunctionerr_into
()
Chapter08/src/bin/errors.rs:67
↓ 1 callersFunctionerr_into_example
()
Chapter08/src/bin/errors.rs:20
↓ 1 callersFunctionexpensive_operation
()
Chapter06/src/bin/logging.rs:33
↓ 1 callersFunctionextract_day
Local static
Chapter05/src/bin/lazy_static.rs:26
↓ 1 callersFunctionfanout
()
Chapter08/src/bin/sinks.rs:69
↓ 1 callersFunctionfast_fibonacci_recursive
(n: u32)
Chapter10/src/bin/benchmarking.rs:43
↓ 1 callersFunctionfibonacci
(n: u32)
Chapter07/src/bin/join.rs:34
↓ 1 callersFunctionfibonacci
()
Chapter10/src/bin/generator.rs:64
↓ 1 callersFunctionfibonacci
()
Chapter02/src/bin/own_iterator.rs:16
↓ 1 callersFunctionfibonacci_imperative
(n: u32)
Chapter10/src/bin/benchmarking.rs:14
↓ 1 callersFunctionfill_some_data
(entry: VacantEntry<&str>)
Chapter02/src/bin/slab.rs:44
↓ 1 callersFunctionflatten
()
Chapter08/src/bin/combinators.rs:87
↓ 1 callersFunctionfuse
()
Chapter08/src/bin/combinators.rs:94
↓ 1 callersFunctionget_content_type
(file: &str)
Chapter09/src/bin/file_server.rs:147
↓ 1 callersFunctionget_name_attribute
(ast: &syn::DeriveInput)
Chapter05/chapter-five-derive/src/lib.rs:44
↓ 1 callersFunctionhandle_echo
(req: Request)
Chapter09/src/bin/echo_server_with_routing.rs:37
↓ 1 callersFunctionhandle_get_file
(file: &str)
Chapter09/src/bin/file_server.rs:42
↓ 1 callersFunctionhandle_invalid_method
()
Chapter09/src/bin/file_server.rs:47
↓ 1 callersFunctionhandle_not_found
()
Chapter09/src/bin/echo_server_with_routing.rs:43
↓ 1 callersFunctionhandle_root
()
Chapter09/src/bin/file_server.rs:37
↓ 1 callersFunctionhandle_root
()
Chapter09/src/bin/echo_server_with_routing.rs:29
↓ 1 callersFunctionhas_file_name
(entry: &DirEntry, name: &str)
Chapter03/src/bin/traverse_files.rs:67
↓ 1 callersFunctionimpl_hello_world
(ast: &syn::DeriveInput)
Chapter05/chapter-five-derive/src/lib.rs:25
↓ 1 callersFunctioninspect
()
Chapter08/src/bin/combinators.rs:111
↓ 1 callersFunctionis_hidden
(entry: &DirEntry)
Chapter03/src/bin/traverse_files.rs:55
↓ 1 callersFunctioniterate_streams
()
Chapter08/src/bin/streams.rs:61
↓ 1 callersFunctionjoin_all_example
()
Chapter08/src/bin/combinators.rs:15
↓ 1 callersFunctionlocal_nested
()
Chapter08/src/bin/pool.rs:111
↓ 1 callersFunctionlocal_spawns_completed
()
Chapter08/src/bin/pool.rs:92
↓ 1 callersFunctionlocal_until
()
Chapter08/src/bin/pool.rs:61
↓ 1 callersMethodlock
(&self)
Chapter06/src/bin/raii.rs:25
↓ 1 callersFunctionmanual_flush
()
Chapter08/src/bin/sinks.rs:137
↓ 1 callersFunctionmap_error
()
Chapter08/src/bin/errors.rs:59
next →1–100 of 272, ranked by callers