pub struct Package {
pub name: String,
pub version: String,
/* private fields */
}
Expand description
The package data. This has information on the current package name, original package name, and specified version.
Fields§
§name: String
The current name of the package. This is always a valid rust identifier.
version: String
The version requirement of the package. Returns *
if no version
requirement is specified.
Implementations§
Source§impl Package
impl Package
Sourcepub fn original_name(&self) -> &str
pub fn original_name(&self) -> &str
Returns the original package name.
Sourcepub fn is_original(&self) -> bool
pub fn is_original(&self) -> bool
Returns true
if the value of the name
field is the original package
name.
Trait Implementations§
impl Eq for Package
impl StructuralPartialEq for Package
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnwindSafe for Package
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