1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
//! The structure is generated by the following code. //! //! ```rust //! use sortedvec::sortedvec; //! //! sortedvec! { //! /// Sorted vector type that provides quick access to `(String, u64)`s through `u64` keys. //! #[derive(Debug, Clone)] //! pub struct ExampleSortedVec { //! fn derive_key(t: &(String, u64)) -> &u64 { &t.1 } //! } //! } //! ``` use crate::sortedvec; sortedvec! { /// Sorted vector type that provides quick access to `(String, u64)`s through `u64` keys. #[derive(Debug, Clone)] pub struct ExampleSortedVec { fn derive_key(t: &(String, u64)) -> u64 { t.1 } } }