Skip to main content

Crate combined_str

Crate combined_str 

Source
Expand description

Zero-copy, const-generic string combinator for no_std environments.

CombinedStr holds N string slices and presents them as a single logical string without allocating. Use the strs! macro to construct one.

§Features

  • alloc (default) — enables conversions to/from String and Cow<str>, plus Add/AddAssign impls for those types.
  • nightly — enables the generic_const_exprs unstable feature, which allows concatenating CombinedStrs with +:
    • CombinedStr<N> + &strCombinedStr<{N + 1}>
    • CombinedStr<N> + CombinedStr<M>CombinedStr<{N + M}>

Macros§

strs
Constructs a CombinedStr from a comma-separated list of string expressions.

Structs§

CombinedStr
A combined view of N string slices, treated as a single contiguous string.
CombinedStrIter
An iterator over the string segments of a CombinedStr.
CombinedStrView
A borrowed view into a CombinedStr, representing a sub-range that may span multiple segments.
CombinedStrViewIter
An iterator over the string segments of a CombinedStrView.

Traits§

CombinedStrIndex
A sealed trait for indexing into a CombinedStr by range, returning a CombinedStrView.