Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ProgrammingRust/examples
/ functions
Functions
161 in github.com/ProgrammingRust/examples
⨍
Functions
161
◇
Types & classes
50
↓ 22 callers
Method
push
Push a character onto the back of a queue.
queue/src/lib.rs:12
↓ 14 callers
Method
insert
Insert `elt` at the current insertion position, and leave the insertion position after it.
gap-buffer/src/lib.rs:118
↓ 13 callers
Method
push
(&mut self, t: T)
generic-queue/src/lib.rs:14
↓ 11 callers
Method
len
Return the number of elements this GapBuffer currently holds.
gap-buffer/src/lib.rs:36
↓ 8 callers
Method
add
(&mut self, value: T)
binary-tree/src/lib.rs:84
↓ 8 callers
Method
capacity
Return the number of elements this GapBuffer could hold without reallocation.
gap-buffer/src/lib.rs:31
↓ 7 callers
Method
space
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 callers
Function
block_on
(future: F)
block-on/src/lib.rs:7
↓ 5 callers
Function
check
(activity: &'static str, status: c_int)
libgit2-rs/src/main.rs:9
↓ 5 callers
Function
check
(code: c_int)
libgit2-rs-safe/src/git/mod.rs:28
↓ 5 callers
Method
space_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 callers
Function
make_node
(left: BinaryTree<T>, element: T, right: BinaryTree<T>)
binary-tree/src/lib.rs:192
↓ 4 callers
Method
set_position
Set the current insertion position to `pos`. If `pos` is out of bounds, panic.
gap-buffer/src/lib.rs:89
↓ 3 callers
Function
char_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 callers
Function
copy_to
Copy whatever is at `src` to the target path `dst`.
copy/src/main.rs:35
↓ 3 callers
Method
get
Return a reference to the `index`'th element, or `None` if `index` is out of bounds.
gap-buffer/src/lib.rs:74
↓ 3 callers
Method
into_iter
(self)
gap-buffer/src/lib.rs:223
↓ 3 callers
Method
is_empty
(&self)
generic-queue/src/lib.rs:18
↓ 3 callers
Method
iter
(&self)
binary-tree/src/lib.rs:157
↓ 3 callers
Method
next
(&mut self)
gap-buffer/src/lib.rs:210
↓ 3 callers
Method
push_left_edge
(&mut self, mut tree: &'a BinaryTree<T>)
binary-tree/src/lib.rs:148
↓ 2 callers
Method
add_route
Add a route to the router.
basic-router/src/lib.rs:31
↓ 2 callers
Function
connect
()
fern_sim/src/net.rs:3
↓ 2 callers
Function
copy_into
(source: P, destination: Q)
copy/src/main.rs:51
↓ 2 callers
Function
grep
(target: &str, reader: R)
grep/src/main.rs:9
↓ 2 callers
Method
insert_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 callers
Method
into_iter
(self)
binary-tree/src/lib.rs:167
↓ 2 callers
Method
is_empty
(&self)
queue/src/lib.rs:57
↓ 2 callers
Method
pop
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 callers
Function
spawn_blocking
(closure: F)
spawn-blocking/src/lib.rs:14
↓ 1 callers
Method
apply_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 callers
Method
author
(&self)
libgit2-rs-safe/src/git/mod.rs:192
↓ 1 callers
Function
cheapo_request
(host: &str, port: u16, path: &str)
many-requests/src/main.rs:4
↓ 1 callers
Function
cheapo_request
(host: &str, port: u16, path: &str)
cheapo-request/src/main.rs:4
↓ 1 callers
Function
copy_dir_to
Copy the existing directory `src` to the target path `dst`.
copy/src/main.rs:9
↓ 1 callers
Function
copy_main
()
copy/src/main.rs:87
↓ 1 callers
Function
dwim_copy
(source: P, destination: Q)
copy/src/main.rs:72
↓ 1 callers
Function
echo_main
Accept connections forever, spawning a thread for each one.
echo-server/src/main.rs:9
↓ 1 callers
Method
enlarge_gap
Double the capacity of `self.storage`.
gap-buffer/src/lib.rs:156
↓ 1 callers
Function
ensure_initialized
()
libgit2-rs-safe/src/git/mod.rs:73
↓ 1 callers
Method
find_commit
(&self, oid: &Oid)
libgit2-rs-safe/src/git/mod.rs:174
↓ 1 callers
Function
gcd
(mut n: u64, mut m: u64)
gcd/src/main.rs:4
↓ 1 callers
Function
get_form_response
()
basic-router/src/lib.rs:56
↓ 1 callers
Function
get_gcd_response
(_req: &Request)
basic-router/src/lib.rs:64
↓ 1 callers
Function
grep_main
()
grep/src/main.rs:21
↓ 1 callers
Function
http_get_main
(url: &str)
http-get/src/main.rs:7
↓ 1 callers
Method
index_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 callers
Method
is_fully_unfurled
(&self)
fern_sim/src/plant_structures/mod.rs:42
↓ 1 callers
Function
make
(p: f32, next: &mut i32, rng: &mut ThreadRng)
binary-tree/src/lib.rs:278
↓ 1 callers
Function
make_random_tree
(p: f32)
binary-tree/src/lib.rs:273
↓ 1 callers
Function
many_requests
(urls: &[String])
many-requests-surf/src/main.rs:1
↓ 1 callers
Function
many_requests
(requests: Vec<(String, u16, String)>)
many-requests/src/main.rs:19
↓ 1 callers
Method
next
(&mut self)
binary-tree/src/lib.rs:174
↓ 1 callers
Function
not_found_response
()
basic-router/src/lib.rs:48
↓ 1 callers
Function
path_to_cstring
(path: &Path)
libgit2-rs-safe/src/git/mod.rs:104
↓ 1 callers
Method
poll
(self: Pin<&mut Self>, cx: &mut Context<'_>)
spawn-blocking/src/lib.rs:51
↓ 1 callers
Method
pop
(&mut self)
generic-queue/src/lib.rs:22
↓ 1 callers
Method
reference_name_to_id
(&self, name: &str)
libgit2-rs-safe/src/git/mod.rs:150
↓ 1 callers
Function
show_commit
(commit: *const raw::git_commit)
libgit2-rs/src/main.rs:24
↓ 1 callers
Method
split
(self)
queue/src/lib.rs:74
↓ 1 callers
Function
symlink
(src: P, _dst: Q)
copy/src/main.rs:28
Method
add
(self, rhs: Self)
complex/src/lib.rs:42
Method
add_assign
(&mut self, rhs: Complex<T>)
complex/src/lib.rs:185
Function
argonautica
()
spawn-blocking/src/tests.rs:29
Function
bad_ascii
()
ascii/src/lib.rs:74
Function
binary_tree_size
()
binary-tree/src/lib.rs:17
Function
build_binary_tree
()
binary-tree/src/lib.rs:27
Function
complex
()
complex/src/lib.rs:216
Function
complex_fancy
()
complex/src/lib.rs:242
Method
distance_from_origin
(&self)
fern_sim/src/spores.rs:41
Method
drop
(&mut self)
gap-buffer/src/lib.rs:191
Method
drop
(&mut self)
libgit2-rs-safe/src/git/mod.rs:94
Function
drop_elements
()
gap-buffer/src/lib.rs:304
Method
email
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
Method
eq
(&self, other: &Complex<T>)
complex/src/lib.rs:92
Function
external_iterator
()
binary-tree/src/lib.rs:191
Method
fern
Get a reference to a fern inside the simulation.
fern_sim/src/simulation.rs:32
Method
fmt
(&self, dest: &mut fmt::Formatter)
complex/src/lib.rs:226
Method
fmt
(&self, f: &mut fmt::Formatter)
gap-buffer/src/lib.rs:238
Method
fmt
(&self, f: &mut fmt::Formatter)
libgit2-rs-safe/src/git/mod.rs:15
Method
from
(ascii: Ascii)
ascii/src/lib.rs:29
Method
from
(b: bool)
json-macro/src/lib.rs:19
Method
from
(message: String)
libgit2-rs-safe/src/git/mod.rs:126
Method
from_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
Method
from_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
Function
fuzz
()
binary-tree/src/lib.rs:272
Function
gcd
(mut n: u64, mut m: u64)
actix-gcd/src/main.rs:58
Function
genes
Extract the genes in a particular spore.
fern_sim/src/spores.rs:21
Method
get_flag
(&self)
ref-with-flag/src/lib.rs:34
Function
get_index
()
actix-gcd/src/main.rs:19
Method
get_ref
(&self)
ref-with-flag/src/lib.rs:27
Method
get_string
(&self)
gap-buffer/src/lib.rs:229
Function
good_ascii
()
ascii/src/lib.rs:57
Method
handle_request
(&self, request: &Request)
basic-router/src/lib.rs:40
Function
hygiene
()
json-macro/src/macros.rs:128
Method
is_furled
(&self)
fern_sim/src/plant_structures/mod.rs:40
Function
json_array_with_json_element
()
json-macro/src/macros.rs:92
Function
json_monolith
()
json-macro/src/macros.rs:111
Function
json_with_rust_expressions
()
json-macro/src/macros.rs:35
Method
load
Load a terrarium from a `.tm` file.
fern_sim/src/simulation.rs:21
next →
1–100 of 161, ranked by callers