Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjon committed Dec 10, 2023
1 parent b9fe606 commit d691a10
Show file tree
Hide file tree
Showing 6 changed files with 472 additions and 225 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ categories = ["data-structures"]
[features]
serde = ["dep:serde"]
id_prim = []
is_id_vec_of = []

[dependencies]
serde = { version = "1.0.193", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can create an identified vec with any element type that implements the `Iden

```rust
extern crate identified_vec;
use identified_vec::{IdentifiedVec, Identifiable, IdentifiedVecOf};
use identified_vec::{IsIdentifiableVec, IdentifiedVec, Identifiable, IdentifiedVecOf};
use std::cell::RefCell;

#[derive(Eq, PartialEq, Clone, Debug)]
Expand Down
9 changes: 7 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//!
//! ```
//! extern crate identified_vec;
//! use identified_vec::{IdentifiedVec, IdentifiedVecOf, Identifiable};
//! use identified_vec::{IsIdentifiableVec, IdentifiedVec, IdentifiedVecOf, Identifiable};
//! use std::cell::RefCell;
//!
//! #[derive(Eq, PartialEq, Clone, Debug)]
Expand Down Expand Up @@ -123,13 +123,14 @@
//!
//! ```
//! extern crate identified_vec;
//! use identified_vec::{IdentifiedVec, IdentifiedVecOf, Identifiable};
//! use identified_vec::{IsIdentifiableVec, IdentifiedVec, IdentifiedVecOf, Identifiable};
//!
//! // closure which plucks out an ID from an element.
//! let numbers = IdentifiedVec::<u32, u32>::new_identifying_element(|e| *e);
//! ```
mod identifiable_trait;
mod is_id_vec_of;
mod primitives_identifiable;
mod serde_error;
mod vec;
Expand All @@ -154,7 +155,11 @@ pub mod identified_vec_of {

#[cfg(feature = "serde")]
pub use crate::serde_error::*;

#[cfg(feature = "is_id_vec_of")]
pub use crate::is_id_vec_of::*;
}

pub use crate::identified_vec::*;
pub use crate::identified_vec_of::*;
pub use crate::vec::IsIdentifiableVec;
Loading

0 comments on commit d691a10

Please sign in to comment.