try_insert_ext/
lib.rs

1//! Provides extension traits for `Option` and map `Entry` types, adding
2//! `try_insert` methods. These methods take possibly empty containers, and if
3//! empty, run an initialization function. If this function errors, an error is
4//! returned. Otherwise, the initialized value is returned.
5
6#[cfg(feature = "std")]
7mod entry;
8mod option;
9#[cfg(feature = "std")]
10mod set;
11
12#[cfg(feature = "std")]
13pub use entry::EntryInsertExt;
14pub use option::OptionInsertExt;
15#[cfg(feature = "std")]
16pub use set::SetInsertExt;