5 releases (3 breaking)
new 0.4.1 | Mar 5, 2025 |
---|---|
0.4.0 | Feb 28, 2025 |
0.3.0 | May 30, 2024 |
0.2.0 | Apr 18, 2024 |
0.1.0 | Jul 20, 2023 |
#308 in Rust patterns
237 downloads per month
Used in 6 crates
(4 directly)
190KB
5.5K
SLoC
Corlib
X | Twitch | Youtube | Mastodon | GitHub | GitHub Sponsors
Corlib is a various ideas library.
Library Contents:
NonOption
Like an option but not optional.
Immut
Forces external immutability.
WorkInProgressResult And IdedWorkInProgressResult
Containers used for communicating the results and statuses of ongoing operations.
GapFillingCounter
A counter that can recycle "gaps".
Getter Setter Caller Macros
Macros for implementing getters, setters and calling methods on regular structs and RefCells.
Get Some
Convert Options into certainty.
Sub-Modules:
Cell
Macros, functions and the RefCellStore which help make working with RefCells easier.
Collections
Collections and collection related objects.
Convert
Convert stuff into &dyn Any and &mut dyn Any.
Drop Panic
A fun way to crash your programme.
Events
Events and event related objects.
Loosely inspred by .NET events.
Has One
Get the value of one for each numeric type.
Inc Dec
Miss the ++ and -- operators?
This module can help sort you out.
Rc
Reference counting related helper structs and traits.
Text
Look at SendableText and AsStr.
Upgrading
Functions that help you deal with upgrading reference counted objects.
Value
For when you want to move values around.
Compiler:
Build with the latest stable compiler.
Todo:
- Add more documentation
- Add code examples
- Add more tests
- Clean-up the code
- Solidify the API for 1.0
Coding Style
This project uses a coding style the emphasises the use of white space over keeping the line and column counts as low as possible.
So this:
fn foo()
{
bar();
}
Not this:
fn foo()
{
bar();
}
License
Licensed under either of:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0 (see also: https://www.tldrlegal.com/license/apache-license-2-0-apache-2-0))
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT (see also: https://www.tldrlegal.com/license/mit-license))
at your discretion
Contributing
Please clone the repository and create an issue explaining what feature or features you'd like to add or bug or bugs you'd like to fix and perhaps how you intend to implement these additions or fixes. Try to include details though it doesn't need to be exhaustive and we'll take it from there (dependant on availability).
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~210–710KB
~17K SLoC