use-id-slug 0.0.1

Composable human-readable slug primitives for RustUse
Documentation
  • Coverage
  • 15%
    3 out of 20 items documented1 out of 10 items with examples
  • Size
  • Source code size: 8.63 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 450.19 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 39s Average build duration of successful builds.
  • all releases: 39s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-id
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-id-slug

Human-readable slug normalization and validation helpers for RustUse.

Install

[dependencies]
use-id-slug = "0.0.1"

The published package keeps the Rust crate name use_slug, so code imports stay the same.

Foundation

use-id-slug keeps slug behavior explicit and predictable: normalize free-form text into lowercase ASCII segments joined by hyphens, then validate the canonical form.

Example

use use_slug::Slug;

let slug = Slug::new("RustUse Docs")?;

assert_eq!(slug.as_str(), "rustuse-docs");
assert_eq!(slug.segments().collect::<Vec<_>>(), vec!["rustuse", "docs"]);
# Ok::<(), use_slug::SlugError>(())

When to use directly

Choose use-id-slug when human-readable identifiers are the only ID surface you need.

Scope

  • Slugs stay lowercase, ASCII, and hyphen-delimited.
  • Normalization is deterministic and documented.
  • Locale-aware transliteration and routing concerns are out of scope.

Status

use-id-slug is a pre-1.0 crate with a deliberately narrow API.