map-rust-crate
Provide a `map!` macro that creates a new map collection then inserts key-value pairs.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (2.7%) to scientific vocabulary
Repository
Provide a `map!` macro that creates a new map collection then inserts key-value pairs.
Basic Info
- Host: GitHub
- Owner: SixArm
- Language: Rust
- Default Branch: main
- Size: 11.7 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
map! macro Rust crate
This crate provides the map! macro and related macros to create map
collections, insert key-value pairs, and remove them. Inspired by vec!.
map! macro
Create a new map collection and insert key-value pairs.
Example with tuple syntax:
rust
let m = map!((1, 2), (3, 4));
Example with arrow syntax:
rust
let m = map!(1 => 2, 3 => 4);
Equivalent Rust standard code:
rust
let mut m = HashMap::new();
m.insert(1, 2);
m.insert(3, 4);
map_insert! macro
Use an existing map collection and insert key-value pairs.
Example with tuple syntax:
rust
let mut m = HashMap::new();
map_insert!(m, (1, 2), (3, 4));
Example with arrow syntax:
rust
let mut m = HashMap::new();
map_insert!(m, 1 => 2, 3 => 4);
Equivalent Rust standard code:
rust
let mut m = HashMap::new();
m.insert(1, 2);
m.insert(3, 4);
map_remove! macro
Use an existing map collection and remove key-value pairs.
Example with tuple syntax:
rust
let mut m = HashMap::from([(1, 2), (3, 4)]);
map_remove!(m, &1, &3);
Equivalent Rust standard code:
rust
let mut m = HashMap::from([(1, 2), (3, 4)]);
m.remove(&1);
m.remove(&3);
Owner
- Name: SixArm
- Login: SixArm
- Kind: organization
- Email: sixarm@sixarm.com
- Location: San Francisco
- Website: http://sixarm.com
- Twitter: sixarm
- Repositories: 580
- Profile: https://github.com/SixArm
SixArm Software
Citation (CITATION.cff)
cff-version: 1.2.0
title: map! macro Rust crate
message: >-
If you use this work and you want to cite it,
then you can use the metadata from this file.
type: software
authors:
- given-names: Joel Parker
family-names: Henderson
email: joel@joelparkerhenderson.com
affiliation: joelparkerhenderson.com
orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
- type: url
value: 'https://github.com/SixArm/map-rust-crate/'
description: map! macro Rust crate
repository-code: 'https://github.com/SixArm/map-rust-crate/'
abstract: >-
map! macro Rust crate
license: See license file
GitHub Events
Total
- Push event: 8
- Create event: 4
Last Year
- Push event: 8
- Create event: 4
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Joel Parker Henderson | j****l@j****m | 11 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0