Struct packageurl::PackageUrl [−][src]
pub struct PackageUrl<'a> { /* fields omitted */ }Expand description
A Package URL.
Implementations
Create a new Package URL with the provided type and name.
Type
The Package URL type must be valid, otherwise an error will be returned. The type can only be composed of ASCII letters and numbers, ‘.’, ‘+’ and ‘-’ (period, plus and dash). It cannot start with a number and cannot contain spaces.
Name
The package name will be canonicalize depending on the type: for instance, ‘bitbucket’ packages have a case-insensitive name, so the name will be lowercased if needed.
Example
assert!( packageurl::PackageUrl::new("cargo", "packageurl").is_ok() ); assert!( packageurl::PackageUrl::new("bad type", "packageurl").is_err() );
Assign a namespace to the package.
Assign a version to the package.
Assign a subpath to the package.
Subpaths must not contain empty, local (‘.’) or parent (‘..’) segments, otherwise an error will be returned.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl<'a> RefUnwindSafe for PackageUrl<'a>impl<'a> Send for PackageUrl<'a>impl<'a> Sync for PackageUrl<'a>impl<'a> Unpin for PackageUrl<'a>impl<'a> UnwindSafe for PackageUrl<'a>Blanket Implementations
Mutably borrows from an owned value. Read more