8000 GitHub - bvssvni/current: A library for setting current values for stack scope, such as application structure
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bvssvni/current

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Current

A library for setting current values for stack scope, such as application structure

Current objects are put on a shadow stack for easy access by type. The type is used as an identifier to get the latest current object in scope.

This is used as a better alternative in Rust than mutable globals.

There are two objects in this library:

  • CurrentGuard is used to create a current object using a mutable reference
  • Current is used to access the reference by type

How to use it

See Best coding practices with current objects

About

A library for setting current values for stack scope, such as application structure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%
0