Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Generic bijective maps in Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT
NotificationsYou must be signed in to change notification settings

billyrieger/bimap-rs

versiondocumentationlicense

bimap-rs is a pure Rust library for dealing with bijective maps, aiming tofeel like an extension of the standard library's data structures wheneverpossible. There are no external dependencies by default butSerde andno_std compatibility are available through feature flags.

  1. Quick start
  2. Feature flags
  3. Documentation
  4. Contributing
  5. Semantic versioning
  6. Minimum supported Rust version
  7. License

Quick start

To use the latest version ofbimap-rs with the default features, add this toyour project'sCargo.toml file:

[dependencies]bimap ="0.6.3"

You can now run thebimap-rs Hello World!

fnmain(){// A bijective map between letters of the English alphabet and their positions.letmut alphabet = bimap::BiMap::<char,u8>::new();    alphabet.insert('A',1);// ...    alphabet.insert('Z',26);println!("A is at position {}", alphabet.get_by_left(&'A').unwrap());println!("{} is at position 26", alphabet.get_by_right(&26).unwrap());}

Feature flags

Flag nameDescriptionEnabled by default?
stdStandard library usage (HashMap)yes
serde(De)serialization usingSerdeno

ThisCargo.toml shows how these features can be enabled and disabled.

[dependencies]# I just want to use `bimap-rs`.bimap ="0.6.3"# I want to use `bimap-rs` without the Rust standard library.bimap = {version ="0.6.3",default-features =false }# I want to use `bimap-rs` with Serde support.bimap = {version ="0.6.3",features = ["serde"] }

Documentation

Documentation for the latest version ofbimap-rs is available ondocs.rs.

Contributing

Thank you for your interest in improvingbimap-rs! Please read thecode ofconduct and thecontributing guidelines before submitting an issue oropening a pull request.

Semantic versioning

bimap-rs adheres to the de-facto Rust variety of Semantic Versioning.

Minimum supported Rust version

bimapMSRV
v0.6.31.56.1
v0.6.21.56.1
v0.6.11.42.0
v0.6.01.38.0
v0.5.31.38.0
v0.5.21.38.0
v0.5.11.38.0
v0.5.01.38.0
v0.4.01.38.0

License

bimap-rs is dual-licensed under theApache License and theMIT License.As a library user, this means that you are free to choose either license whenusingbimap-rs. As a library contributor, this means that any work youcontribute tobimap-rs will be similarly dual-licensed.

About

Generic bijective maps in Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT

Code of conduct

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp