Struct makedeb_srcinfo::SplitPackage
source · 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
sourceimpl 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 RefUnwindSafe for SplitPackage
impl Send for SplitPackage
impl Sync for SplitPackage
impl Unpin for SplitPackage
impl UnwindSafe for SplitPackage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more