33 releases

0.7.7 Oct 11, 2024
0.7.2 Apr 14, 2024
0.7.0 Sep 14, 2022
0.6.0 Jul 14, 2022
0.1.1 May 5, 2018

#104 in Rust patterns

Download history 97670/week @ 2024-08-24 93377/week @ 2024-08-31 125823/week @ 2024-09-07 114637/week @ 2024-09-14 108783/week @ 2024-09-21 124009/week @ 2024-09-28 109827/week @ 2024-10-05 119837/week @ 2024-10-12 125683/week @ 2024-10-19 127140/week @ 2024-10-26 109755/week @ 2024-11-02 126509/week @ 2024-11-09 140370/week @ 2024-11-16 100003/week @ 2024-11-23 132621/week @ 2024-11-30 116001/week @ 2024-12-07

514,659 downloads per month
Used in 103 crates (45 directly)

MIT/Apache

560KB
8K SLoC

iri-string

Latest version Documentation Minimum rustc version: 1.60

String types for IRIs (Internationalized Resource Identifiers) and URIs (Uniform Resource Identifiers).

See the documentation for details.

Features

  • no_std support.
  • String types (both owned and borrowed) for RFC 3986 URIs and RFC 3987 IRIs.
    • Native slice types, so highly operable with Cow, ToOwned, etc.
    • URIs/IRIs validation.
    • Conversions between URIs and IRIs.
    • Decomposition into components.
  • IRI reference resolution algorithm.
  • IRI normalization algorithm.
  • Masking password part of an IRI (optional and not automatic).
  • Percent encoding of user-provided strings.
  • IRI builder.
  • RFC 6570 URI Template.

Feature flags

Direct

  • alloc (enabled by default)
    • Enables types and functions which require memory allocation.
    • Requires std or alloc crate available.
  • std (enabled by default)
    • Enables all std features (such as memory allocations and std::error::Error trait).
    • Requires std crate available.
    • This automatically enables alloc feature.

memchr

  • memchr
    • Enables optimization for internal parsers, using memchr crate.

serde

  • serde
    • Implements Serialize and Deserialize traits for string types.

CI

CI must pass on develop and master branches. No automated online CI is set up (since they consumes credit too fast), so run cargo make manual-ci-all locally before committing to these branches. On other branches, tests and some lints (such as dead_code) are allowed to fail, but all commits must be successfully compilable and must be formatted.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies