pub struct SplitPackage {
    pub pkgname: String,
    pub operator: Option<String>,
    pub version: Option<String>,
}
Expand description

A Struct representing a package’s name, operator, and version.

Fields

pkgname: Stringoperator: Option<String>version: Option<String>

Implementations

Split a dependency into its name, equality operator, and version. Note that this function simply splits on the first operator (“<<”, “>=”, etc etc.) found - if you pass in more than one the returned ‘version’ field will contain the remaining operators. Versions are also not checked to see if they’re valid, if you need such behavior please check inside of your application.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.