maxlen-macro

Crates.iomaxlen-macro
lib.rsmaxlen-macro
version0.1.0
created_at2025-03-16 19:37:12.776458+00
updated_at2025-03-16 19:37:12.776458+00
descriptionLength-bounded string and slice/vector
homepage
repositoryhttps://github.com/PonasKovas/maxlen
max_upload_size
id1594704
size7,772
Mykolas Peteraitis (PonasKovas)

documentation

README

maxlen

crates.io docs.rs

Length-bounded wrappers over standard types.

This crate provides several types that enforce length limits at the type level:

  • BSlice<T, MAX> is a [T] but guaranteed to not have more than MAX elements.
  • BVec<T, MAX> is a Vec<T> but guaranteed to not have more than MAX elements.
  • BStr<MAX, E> is a str but guarantees that the text will not be longer than MAX bytes in the specified encoding (not necessarily UTF-8).
  • BString<MAX, E> is a String but guarantees that the text will not be longer than MAX bytes in the specified encoding (not necessarily UTF-8).
Commit count: 21

cargo fmt