Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nwtgck/anyident-rust
Any identifier for Rust
https://github.com/nwtgck/anyident-rust
any identifier rust
Last synced: about 1 month ago
JSON representation
Any identifier for Rust
- Host: GitHub
- URL: https://github.com/nwtgck/anyident-rust
- Owner: nwtgck
- License: mit
- Created: 2020-09-08T10:39:38.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2020-09-08T10:47:20.000Z (over 4 years ago)
- Last Synced: 2024-10-11T15:08:06.619Z (3 months ago)
- Topics: any, identifier, rust
- Language: Rust
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# anyident
Any identifier for Rust## Install
```toml
# Cargo.toml[dependencies]
anyident = { git = "https://github.com/nwtgck/anyident-rust.git" }
```## Usage
```rust
use anyident::i;let i!(this is an identifier) = "hello, world";
assert_eq!(i!(this is an identifier), "hello, world");// Japanese characters
let i!(こんにちは) = "hello!";
assert_eq!(i!(こんにちは).len(), 6);
```## Current encoding in internal implementation
Currently, encoding is hex format. I have a plan to use more human readable one. `i!(こんにちは)` is encoded into `hex_e38193e38293e381abe381a1e381af`.