semisafe/lib.rs
1//! `semisafe` is a crate containing semi-safe utilities for performance-critical Rust code.
2//! Every function in this crate is safe in debug mode and unsafe in release mode.
3//! This is meant to provide an improved alternative to strictly-unsafe methods like `get_unchecked`.
4//!
5//! - Only use these methods in places where the code should NEVER panic.
6//! Treat them as unchecked methods.
7//! - You should have comprehensive automated tests around code when using these functions.
8//! Run them in debug mode to catch unexpected behavior.
9//! Distribute in release mode to get the performance benefits.
10//!
11//! Disclaimer: YOU PROBABLY DON'T NEED THIS CRATE.
12//! IF YOU AREN'T SURE WHETHER YOU NEED THIS CRATE,
13//! THEN YOU DON'T NEED THIS CRATE.
14//! This crate is intended for low-level, performance-critical code.
15//! You do not need it for everyday applications.
16
17pub mod cmp;
18pub mod nonzero;
19pub mod option;
20pub mod result;
21pub mod slice;