[][src]Crate sbitty

Standard integers does not have any standard implementation of bitwise manipulation. This crate is made to fill this gap and hide ugly bitwise operation which are error prone behind some runtime safe functions.

It is made so you only have to call functions to use it properly. This crate use indexes as you would in vectors or Arrays. If any index error happend in your program you will get Option<T> or Result<_,_> returned to properly handle this in a production ready manner.

Enums

IndexError

The IndexError enum is used for error handling This should not be seen as an API user

Traits

GetBit

performing _ & (1 << idx) with n the index

SetBit
ToggleBit
UnsetBit