MCPcopy Create free account

hub / github.com/ProgrammingRust/examples / functions

Functions161 in github.com/ProgrammingRust/examples

↓ 22 callersMethodpush
Push a character onto the back of a queue.
queue/src/lib.rs:12
↓ 14 callersMethodinsert
Insert `elt` at the current insertion position, and leave the insertion position after it.
gap-buffer/src/lib.rs:118
↓ 13 callersMethodpush
(&mut self, t: T)
generic-queue/src/lib.rs:14
↓ 11 callersMethodlen
Return the number of elements this GapBuffer currently holds.
gap-buffer/src/lib.rs:36
↓ 8 callersMethodadd
(&mut self, value: T)
binary-tree/src/lib.rs:84
↓ 8 callersMethodcapacity
Return the number of elements this GapBuffer could hold without reallocation.
gap-buffer/src/lib.rs:31
↓ 7 callersMethodspace
Return a pointer to the `index`'th element of the underlying storage, regardless of the gap. Safety: `index` must be a valid index into `self.storage
gap-buffer/src/lib.rs:49
↓ 6 callersFunctionblock_on
(future: F)
block-on/src/lib.rs:7
↓ 5 callersFunctioncheck
(activity: &'static str, status: c_int)
libgit2-rs/src/main.rs:9
↓ 5 callersFunctioncheck
(code: c_int)
libgit2-rs-safe/src/git/mod.rs:28
↓ 5 callersMethodspace_mut
Return a mutable pointer to the `index`'th element of the underlying storage, regardless of the gap. Safety: `index` must be a valid index into `self
gap-buffer/src/lib.rs:57
↓ 4 callersFunctionmake_node
(left: BinaryTree<T>, element: T, right: BinaryTree<T>)
binary-tree/src/lib.rs:192
↓ 4 callersMethodset_position
Set the current insertion position to `pos`. If `pos` is out of bounds, panic.
gap-buffer/src/lib.rs:89
↓ 3 callersFunctionchar_ptr_to_str
Try to borrow a `&str` from `ptr`, given that `ptr` may be null or refer to ill-formed UTF-8. Give the result a lifetime as if it were borrowed from `
libgit2-rs-safe/src/git/mod.rs:239
↓ 3 callersFunctioncopy_to
Copy whatever is at `src` to the target path `dst`.
copy/src/main.rs:35
↓ 3 callersMethodget
Return a reference to the `index`'th element, or `None` if `index` is out of bounds.
gap-buffer/src/lib.rs:74
↓ 3 callersMethodinto_iter
(self)
gap-buffer/src/lib.rs:223
↓ 3 callersMethodis_empty
(&self)
generic-queue/src/lib.rs:18
↓ 3 callersMethoditer
(&self)
binary-tree/src/lib.rs:157
↓ 3 callersMethodnext
(&mut self)
gap-buffer/src/lib.rs:210
↓ 3 callersMethodpush_left_edge
(&mut self, mut tree: &'a BinaryTree<T>)
binary-tree/src/lib.rs:148
↓ 2 callersMethodadd_route
Add a route to the router.
basic-router/src/lib.rs:31
↓ 2 callersFunctionconnect
()
fern_sim/src/net.rs:3
↓ 2 callersFunctioncopy_into
(source: P, destination: Q)
copy/src/main.rs:51
↓ 2 callersFunctiongrep
(target: &str, reader: R)
grep/src/main.rs:9
↓ 2 callersMethodinsert_iter
Insert the elements produced by `iter` at the current insertion position, and leave the insertion position after them.
gap-buffer/src/lib.rs:132
↓ 2 callersMethodinto_iter
(self)
binary-tree/src/lib.rs:167
↓ 2 callersMethodis_empty
(&self)
queue/src/lib.rs:57
↓ 2 callersMethodpop
Pop a character off the front of a queue. Return `Some(c)` if there was a character to pop, or `None` if the queue was empty.
queue/src/lib.rs:18
↓ 2 callersFunctionspawn_blocking
(closure: F)
spawn-blocking/src/lib.rs:14
↓ 1 callersMethodapply_sunlight
Let the sun shine in and run the simulation for a given amount of time. # use fern_sim::Terrarium; # use std::time::Duration; # let mut tm = Terrariu
fern_sim/src/simulation.rs:45
↓ 1 callersMethodauthor
(&self)
libgit2-rs-safe/src/git/mod.rs:192
↓ 1 callersFunctioncheapo_request
(host: &str, port: u16, path: &str)
many-requests/src/main.rs:4
↓ 1 callersFunctioncheapo_request
(host: &str, port: u16, path: &str)
cheapo-request/src/main.rs:4
↓ 1 callersFunctioncopy_dir_to
Copy the existing directory `src` to the target path `dst`.
copy/src/main.rs:9
↓ 1 callersFunctioncopy_main
()
copy/src/main.rs:87
↓ 1 callersFunctiondwim_copy
(source: P, destination: Q)
copy/src/main.rs:72
↓ 1 callersFunctionecho_main
Accept connections forever, spawning a thread for each one.
echo-server/src/main.rs:9
↓ 1 callersMethodenlarge_gap
Double the capacity of `self.storage`.
gap-buffer/src/lib.rs:156
↓ 1 callersFunctionensure_initialized
()
libgit2-rs-safe/src/git/mod.rs:73
↓ 1 callersMethodfind_commit
(&self, oid: &Oid)
libgit2-rs-safe/src/git/mod.rs:174
↓ 1 callersFunctiongcd
(mut n: u64, mut m: u64)
gcd/src/main.rs:4
↓ 1 callersFunctionget_form_response
()
basic-router/src/lib.rs:56
↓ 1 callersFunctionget_gcd_response
(_req: &Request)
basic-router/src/lib.rs:64
↓ 1 callersFunctiongrep_main
()
grep/src/main.rs:21
↓ 1 callersFunctionhttp_get_main
(url: &str)
http-get/src/main.rs:7
↓ 1 callersMethodindex_to_raw
Return the offset in the buffer of the `index`'th element, taking the gap into account. This does not check whether index is in range, but it never re
gap-buffer/src/lib.rs:64
↓ 1 callersMethodis_fully_unfurled
(&self)
fern_sim/src/plant_structures/mod.rs:42
↓ 1 callersFunctionmake
(p: f32, next: &mut i32, rng: &mut ThreadRng)
binary-tree/src/lib.rs:278
↓ 1 callersFunctionmake_random_tree
(p: f32)
binary-tree/src/lib.rs:273
↓ 1 callersFunctionmany_requests
(urls: &[String])
many-requests-surf/src/main.rs:1
↓ 1 callersFunctionmany_requests
(requests: Vec<(String, u16, String)>)
many-requests/src/main.rs:19
↓ 1 callersMethodnext
(&mut self)
binary-tree/src/lib.rs:174
↓ 1 callersFunctionnot_found_response
()
basic-router/src/lib.rs:48
↓ 1 callersFunctionpath_to_cstring
(path: &Path)
libgit2-rs-safe/src/git/mod.rs:104
↓ 1 callersMethodpoll
(self: Pin<&mut Self>, cx: &mut Context<'_>)
spawn-blocking/src/lib.rs:51
↓ 1 callersMethodpop
(&mut self)
generic-queue/src/lib.rs:22
↓ 1 callersMethodreference_name_to_id
(&self, name: &str)
libgit2-rs-safe/src/git/mod.rs:150
↓ 1 callersFunctionshow_commit
(commit: *const raw::git_commit)
libgit2-rs/src/main.rs:24
↓ 1 callersMethodsplit
(self)
queue/src/lib.rs:74
↓ 1 callersFunctionsymlink
(src: P, _dst: Q)
copy/src/main.rs:28
Methodadd
(self, rhs: Self)
complex/src/lib.rs:42
Methodadd_assign
(&mut self, rhs: Complex<T>)
complex/src/lib.rs:185
Functionargonautica
()
spawn-blocking/src/tests.rs:29
Functionbad_ascii
()
ascii/src/lib.rs:74
Functionbinary_tree_size
()
binary-tree/src/lib.rs:17
Functionbuild_binary_tree
()
binary-tree/src/lib.rs:27
Functioncomplex
()
complex/src/lib.rs:216
Functioncomplex_fancy
()
complex/src/lib.rs:242
Methoddistance_from_origin
(&self)
fern_sim/src/spores.rs:41
Methoddrop
(&mut self)
gap-buffer/src/lib.rs:191
Methoddrop
(&mut self)
libgit2-rs-safe/src/git/mod.rs:94
Functiondrop_elements
()
gap-buffer/src/lib.rs:304
Methodemail
Return the author's email as a `&str`, or `None` if it is not well-formed UTF-8.
libgit2-rs-safe/src/git/mod.rs:225
Methodeq
(&self, other: &Complex<T>)
complex/src/lib.rs:92
Functionexternal_iterator
()
binary-tree/src/lib.rs:191
Methodfern
Get a reference to a fern inside the simulation.
fern_sim/src/simulation.rs:32
Methodfmt
(&self, dest: &mut fmt::Formatter)
complex/src/lib.rs:226
Methodfmt
(&self, f: &mut fmt::Formatter)
gap-buffer/src/lib.rs:238
Methodfmt
(&self, f: &mut fmt::Formatter)
libgit2-rs-safe/src/git/mod.rs:15
Methodfrom
(ascii: Ascii)
ascii/src/lib.rs:29
Methodfrom
(b: bool)
json-macro/src/lib.rs:19
Methodfrom
(message: String)
libgit2-rs-safe/src/git/mod.rs:126
Methodfrom_bytes
Create an `Ascii` from the ASCII text in `bytes`. Return a `NotAsciiError` error if `bytes` contains any non-ASCII characters.
ascii/src/lib.rs:14
Methodfrom_bytes_unchecked
Construct an `Ascii` value from `bytes`, without checking whether `bytes` actually contains well-formed ASCII. This constructor is infallible, and re
ascii/src/lib.rs:50
Functionfuzz
()
binary-tree/src/lib.rs:272
Functiongcd
(mut n: u64, mut m: u64)
actix-gcd/src/main.rs:58
Functiongenes
Extract the genes in a particular spore.
fern_sim/src/spores.rs:21
Methodget_flag
(&self)
ref-with-flag/src/lib.rs:34
Functionget_index
()
actix-gcd/src/main.rs:19
Methodget_ref
(&self)
ref-with-flag/src/lib.rs:27
Methodget_string
(&self)
gap-buffer/src/lib.rs:229
Functiongood_ascii
()
ascii/src/lib.rs:57
Methodhandle_request
(&self, request: &Request)
basic-router/src/lib.rs:40
Functionhygiene
()
json-macro/src/macros.rs:128
Methodis_furled
(&self)
fern_sim/src/plant_structures/mod.rs:40
Functionjson_array_with_json_element
()
json-macro/src/macros.rs:92
Functionjson_monolith
()
json-macro/src/macros.rs:111
Functionjson_with_rust_expressions
()
json-macro/src/macros.rs:35
Methodload
Load a terrarium from a `.tm` file.
fern_sim/src/simulation.rs:21
next →1–100 of 161, ranked by callers