Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2572072
id.rs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
304 B
Referenced Files
None
Subscribers
None
id.rs
View Options
use
std
::
sync
::
atomic
::{
AtomicUsize
,
Ordering
};
pub
struct
AutoIncrement
{
pub
counter
:
AtomicUsize
,
}
impl
AutoIncrement
{
pub
fn
new
(
start
:
usize
)
->
Self
{
AutoIncrement
{
counter
:
AtomicUsize
::
new
(
start
)
}
}
pub
fn
next
(
&
self
)
->
usize
{
self
.
counter
.
fetch_add
(
1
,
Ordering
::
SeqCst
)
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 15, 7:57 PM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
484881
Default Alt Text
id.rs (304 B)
Attached To
Mode
rPMC Process Management Controller
Attached
Detach File
Event Timeline
Log In to Comment