take_ref/lib.rs
1//! # take_ref
2//!
3//! take_ref provides the `TakeRef`, `TakeSlice`, and `TakeString` traits
4//! to enable treating values and their reference/slice types interchangeably
5//! until the moment taking ownership is required.
6//! If taking ownership is required sometimes but not always,
7//! this can eliminate the need to always copy data from reference types.
8
9#![crate_name = "take_ref"]
10
11#![cfg_attr(not(any(feature="use_std", doc)), no_std)]
12
13mod take_ref;
14pub use crate::take_ref::TakeRef;
15
16#[cfg(any(feature = "use_std", doc))]
17mod take_slice;
18#[cfg(any(feature = "use_std", doc))]
19pub use crate::take_slice::TakeSlice;
20
21#[cfg(any(feature = "use_std"))]
22mod take_string;
23#[cfg(any(feature = "use_std"))]
24pub use crate::take_string::TakeString;