Crates.io | bool-toggle |
lib.rs | bool-toggle |
version | 1.1.1 |
source | src |
created_at | 2024-02-08 17:16:27.207988 |
updated_at | 2024-02-13 17:53:30.823586 |
description | bool toggling for the bool toggle enjoyers |
homepage | |
repository | https://github.com/Nilstrieb/bool-toggle |
max_upload_size | |
id | 1132400 |
size | 11,298 |
i love toggling bools it's one of my favourite things to do
Provides fn toggle(&mut self)
on bool
for toggling bools.
use bool_toggle::TogglingIsALifestyle;
let mut omg_i_want_to_be_toggled_soooo_badly = false;
assert_eq!(omg_i_want_to_be_toggled_soooo_badly, false);
omg_i_want_to_be_toggled_soooo_badly.toggle();
assert_eq!(omg_i_want_to_be_toggled_soooo_badly, true);
omg_i_want_to_be_toggled_soooo_badly.toggle();
assert_eq!(omg_i_want_to_be_toggled_soooo_badly, false);
let i_dont_want_to_be_toggled = false;
// That's okay.
This crate supports a professional re-export of the trait, BoolToggleExt
.
It is only available when compiling with --cfg enterprise_license
and obtaining an enterprise license.
For license inquiries, send mail to /dev/null
.
The minimum supported Rust version of this crate is 1.1000.0. Lower versions might compile but are not supported.
This Crate features the world's most resilient bit flipping algorithm. Its code adheres to the highest clean code standards and aims to provide a maintainable and future proof solution to all the boolean toggling needs there are.