Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SergioBenitez/state
/ functions
Functions
51 in github.com/SergioBenitez/state
⨍
Functions
51
◇
Types & classes
15
↓ 5 callers
Method
get
Returns the element for the current thread, if it exists.
src/lib.rs:198
↓ 4 callers
Method
get_or
Returns the element for the current thread, or creates it if it doesn't exist.
src/lib.rs:205
↓ 4 callers
Method
iter_mut
Returns a mutable iterator over the local values of all threads in unspecified order. Since this call borrows the `ThreadLocal` mutably, this operati
src/lib.rs:296
↓ 3 callers
Method
iter
Returns an iterator over the local values of all threads in unspecified order. This call can be done safely, as `T` is required to implement [`Sync`]
src/lib.rs:280
↓ 2 callers
Function
get
Get the current thread.
src/thread_id.rs:92
↓ 2 callers
Method
get_inner
(&self, thread: Thread)
src/lib.rs:229
↓ 2 callers
Function
make_create
()
src/lib.rs:537
↓ 2 callers
Method
next_bucket
(&mut self)
src/lib.rs:426
↓ 1 callers
Method
alloc
(&mut self)
src/thread_id.rs:29
↓ 1 callers
Function
allocate_bucket
(size: usize)
src/lib.rs:517
↓ 1 callers
Method
clear
Removes all thread-specific values from the `ThreadLocal`, effectively reseting it to its original state. Since this call borrows the `ThreadLocal` m
src/lib.rs:309
↓ 1 callers
Method
free
(&mut self, id: usize)
src/thread_id.rs:41
↓ 1 callers
Method
get_or
(&self, create: F)
src/cached.rs:41
↓ 1 callers
Method
get_or_try
Returns the element for the current thread, or creates it if it doesn't exist. If `create` fails, that error is returned and no element is added.
src/lib.rs:218
↓ 1 callers
Method
insert
(&self, thread: Thread, data: T)
src/lib.rs:247
↓ 1 callers
Method
into_iter
(self)
src/lib.rs:318
↓ 1 callers
Method
iter_mut
(&mut self)
src/cached.rs:65
↓ 1 callers
Method
next_mut
( &mut self, thread_local: &'a mut ThreadLocal<T>, )
src/lib.rs:398
↓ 1 callers
Method
size_hint_frozen
(&self, thread_local: &ThreadLocal<T>)
src/lib.rs:438
↓ 1 callers
Method
unchecked_unwrap_ok
(self)
src/unreachable.rs:44
Method
clear
(&mut self)
src/cached.rs:78
Method
default
()
src/lib.rs:136
Method
default
()
src/cached.rs:18
Function
different_thread
()
src/lib.rs:560
Method
drop
(&mut self)
src/lib.rs:123
Method
drop
(&mut self)
src/thread_id.rs:84
Method
fmt
(&self, f: &mut fmt::Formatter)
src/lib.rs:353
Method
fmt
(&self, f: &mut fmt::Formatter)
src/cached.rs:112
Function
foo
()
src/lib.rs:634
Method
get
(&self)
src/cached.rs:34
Method
get_or_default
Returns the element for the current thread, or creates a default one if it doesn't exist.
src/lib.rs:347
Method
get_or_default
Returns the element for the current thread, or creates a default one if it doesn't exist.
src/cached.rs:106
Method
get_or_try
(&self, create: F)
src/cached.rs:52
Method
into_iter
(self)
src/cached.rs:87
Function
is_sync
()
src/lib.rs:633
Function
iter
()
src/lib.rs:582
Function
main
()
benches/thread_local.rs:8
Method
new
Creates a new empty `ThreadLocal`.
src/lib.rs:165
Method
new
()
src/thread_id.rs:23
Method
new
()
src/cached.rs:26
Method
next
(&mut self, thread_local: &'a ThreadLocal<T>)
src/lib.rs:378
Method
next
(&mut self)
src/cached.rs:129
Function
same_thread
()
src/lib.rs:543
Method
size_hint
(&self, thread_local: &ThreadLocal<T>)
src/lib.rs:434
Method
size_hint
(&self)
src/cached.rs:134
Function
test_drop
()
src/lib.rs:616
Function
test_thread
()
src/thread_id.rs:97
Method
unchecked_unwrap
(self)
src/unreachable.rs:29
Method
unchecked_unwrap_err
(self)
src/unreachable.rs:51
Method
unchecked_unwrap_none
(self)
src/unreachable.rs:36
Method
with_capacity
Creates a new `ThreadLocal` with an initial capacity. If less than the capacity threads access the thread local it will never reallocate. The capacity
src/lib.rs:172