pub struct PackageRef {
pub directory: String,
pub name: String,
}Expand description
A package’s directory/name: its download path, its cache and ledger key,
and the wire form of a requires entry.
Fields§
§directory: String§name: StringImplementations§
Source§impl PackageRef
impl PackageRef
Sourcepub fn parse(text: &str) -> Option<PackageRef>
pub fn parse(text: &str) -> Option<PackageRef>
Splits on the first /, since the name is itself a path, and rejects
anything valid_name rejects.
Trait Implementations§
Source§impl Clone for PackageRef
impl Clone for PackageRef
Source§fn clone(&self) -> PackageRef
fn clone(&self) -> PackageRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PackageRef
impl Debug for PackageRef
Source§impl Display for PackageRef
impl Display for PackageRef
impl Eq for PackageRef
Source§impl Hash for PackageRef
impl Hash for PackageRef
Source§impl Ord for PackageRef
impl Ord for PackageRef
Source§fn cmp(&self, other: &PackageRef) -> Ordering
fn cmp(&self, other: &PackageRef) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PackageRef
impl PartialEq for PackageRef
Source§impl PartialOrd for PackageRef
impl PartialOrd for PackageRef
impl StructuralPartialEq for PackageRef
Auto Trait Implementations§
impl Freeze for PackageRef
impl RefUnwindSafe for PackageRef
impl Send for PackageRef
impl Sync for PackageRef
impl Unpin for PackageRef
impl UnsafeUnpin for PackageRef
impl UnwindSafe for PackageRef
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