[PURL] parsing, manipulation, and formatting.
A PURL is an identifier that refers to a software package. For example,
pkg:cargo/purl
refers to this package.
This library supports PURLs at two levels:
GenericPurl
]. It is possible to work with package-type-agnostic PURLs by using types like GenericPurl<String>
. (see also [package-url/purl-spec#38])PackageType
] and combined with [GenericPurl
] by the type alias [Purl
]. This implementation differs slightly from the PURL specification (see [PackageType
] for details). It is possible to implement different package-type-specific behaviors or support for different package types by implementing the [PurlShape
] trait.```rust use std::str::FromStr;
use purl::GenericPurl;
fn main() -> Result<(), Box
let purl = purl.into_builder().without_version().without_qualifier("checksum").build()?;
assert_eq!("pkg:npm/%40acme/example", &purl.to_string(),);
Ok(())
} ```
PackageType
] and related types