pub struct PkgRequest {
pub source: PkgRequestSource,
pub id: Arc<str>,
pub content_version: VersionPattern,
}
Expand description
Used to store a request for a package that will be fulfilled later
Fields§
§source: PkgRequestSource
The source of this request. Could be a dependent, a recommender, or anything else.
id: Arc<str>
The ID of the package to request
content_version: VersionPattern
The requested content version of the package
Implementations§
Source§impl PkgRequest
impl PkgRequest
Sourcepub fn new(
id: impl Into<Arc<str>>,
source: PkgRequestSource,
content_version: VersionPattern,
) -> PkgRequest
pub fn new( id: impl Into<Arc<str>>, source: PkgRequestSource, content_version: VersionPattern, ) -> PkgRequest
Create a new PkgRequest
Sourcepub fn any(id: impl Into<Arc<str>>, source: PkgRequestSource) -> PkgRequest
pub fn any(id: impl Into<Arc<str>>, source: PkgRequestSource) -> PkgRequest
Create a new PkgRequest that matches all content versions
Sourcepub fn parse(string: impl AsRef<str>, source: PkgRequestSource) -> PkgRequest
pub fn parse(string: impl AsRef<str>, source: PkgRequestSource) -> PkgRequest
Parse the package name and content version from a string
Sourcepub fn debug_sources(&self) -> String
pub fn debug_sources(&self) -> String
Create a dependency list for debugging
Trait Implementations§
Source§impl Clone for PkgRequest
impl Clone for PkgRequest
Source§fn clone(&self) -> PkgRequest
fn clone(&self) -> PkgRequest
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 PkgRequest
impl Debug for PkgRequest
Source§impl<'de> Deserialize<'de> for PkgRequest
impl<'de> Deserialize<'de> for PkgRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PkgRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PkgRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PkgRequest
impl Display for PkgRequest
Source§impl Hash for PkgRequest
impl Hash for PkgRequest
Source§impl Ord for PkgRequest
impl Ord for PkgRequest
Source§fn cmp(&self, other: &PkgRequest) -> Ordering
fn cmp(&self, other: &PkgRequest) -> Ordering
1.21.0 · 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 PkgRequest
impl PartialEq for PkgRequest
Source§impl PartialOrd for PkgRequest
impl PartialOrd for PkgRequest
Source§impl Serialize for PkgRequest
impl Serialize for PkgRequest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for PkgRequest
Auto Trait Implementations§
impl Freeze for PkgRequest
impl RefUnwindSafe for PkgRequest
impl Send for PkgRequest
impl Sync for PkgRequest
impl Unpin for PkgRequest
impl UnwindSafe for PkgRequest
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more