Skip to content

coruscateor/corlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Corlib

Crates.io License Downloads Docs Twitch Status

X | Twitch | Youtube | Mastodon | GitHub | GitHub Sponsors

Corlib is a various ideas library.

Library Contents:

NonOption

Like an option but not optional.

Immut

Guarantees external immutability for its contained object.

GapFillingCounter

Increments a number returning "gap" mumbers, numbers that are reported to be no longer "be in use", first.

Getter Setter Caller Macros

Removed, look at Accessorise.

ControlFlow

Like the standard ControlFlow enum, without the type requirements.

GetSome

Convert Options into certainty with the get_some declarative macro.

WeakSelf

Tait and derive macro used to implement the weak-self design pattern.


Sub-Modules:

Any

Cast stuff into &dyn Any and &mut dyn Any.

Cell

The items in this module help you work with RefCells.

Collections

Collection related stucts and traits, some of which are inspired by .NET collections.

DropPanic

Panicking made convenient.

Events

Event structs loosely inspired by .NET events.

HasOne

A Trait and trait implementations for helping you get the value of one for each standard numeric type.

IncDec

Moved to: IncDec

Rc

Reference counting related helpers.

Text

Look at AsStr and AsMutStr, SendableText and related structs moved to Highly Sendable.

Upgrading

Now in the Rc module.

Value

For when you want to do stuff with values and generic type constraints.


Compiler:

Build with the latest stable compiler.


Features

Feature Description
serde Enable serde related features.
drop_panic Enable the drop_panic module.
macros Enable the declarative macros.

Todo:

  • Add more documentation
  • Add code examples
  • Add more tests
  • Clean-up the code

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:

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.

About

A various ideas library

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENCE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors

Languages