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: String§operator: Option<String>§version: Option<String>Implementations§
Source§impl SplitPackage
impl SplitPackage
Sourcepub fn new(pkg_string: &str) -> Self
pub fn new(pkg_string: &str) -> Self
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§
impl Freeze for SplitPackage
impl RefUnwindSafe for SplitPackage
impl Send for SplitPackage
impl Sync for SplitPackage
impl Unpin for SplitPackage
impl UnsafeUnpin for SplitPackage
impl UnwindSafe for SplitPackage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more