pub struct PackageReq {
pub name: String,
pub version_req: VersionReq,
}
Expand description
The name and version constraint component of an PackageReqReference
.
Fields§
§name: String
§version_req: VersionReq
Implementations§
source§impl PackageReq
impl PackageReq
pub fn from_str(text: &str) -> Result<Self, PackageReqParseError>
pub fn from_str_loose(text: &str) -> Result<Self, PackageReqParseError>
sourcepub fn to_string_normalized(&self) -> String
pub fn to_string_normalized(&self) -> String
Outputs a normalized string representation of the package requirement.
Trait Implementations§
source§impl Clone for PackageReq
impl Clone for PackageReq
source§fn clone(&self) -> PackageReq
fn clone(&self) -> PackageReq
Returns a copy of the value. Read more
1.0.0 · 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 PackageReq
impl Debug for PackageReq
source§impl<'de> Deserialize<'de> for PackageReq
impl<'de> Deserialize<'de> for PackageReq
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for PackageReq
impl Display for PackageReq
source§impl Hash for PackageReq
impl Hash for PackageReq
source§impl Ord for PackageReq
impl Ord for PackageReq
source§impl PartialEq for PackageReq
impl PartialEq for PackageReq
source§impl PartialOrd for PackageReq
impl PartialOrd for PackageReq
source§impl Serialize for PackageReq
impl Serialize for PackageReq
impl Eq for PackageReq
impl StructuralPartialEq for PackageReq
Auto Trait Implementations§
impl Freeze for PackageReq
impl RefUnwindSafe for PackageReq
impl Send for PackageReq
impl Sync for PackageReq
impl Unpin for PackageReq
impl UnwindSafe for PackageReq
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)