pub enum PackageId {
Winget {
id: String,
},
Scoop {
bucket: BucketName,
id: String,
},
Chocolatey {
id: String,
},
Winbrew {
id: String,
},
}Expand description
The canonical package id syntax used by catalog and query code.
Variants§
Winget
A Winget catalog id.
Scoop
A Scoop bucket/id pair.
Chocolatey
A Chocolatey package id.
Winbrew
A WinBrew package id.
Implementations§
Source§impl PackageId
impl PackageId
Sourcepub fn parse(input: &str) -> Result<Self, ModelError>
pub fn parse(input: &str) -> Result<Self, ModelError>
Parse a canonical catalog id from winget/<id>, scoop/<bucket>/<id>,
chocolatey/<id>, or winbrew/<id> syntax.
Sourcepub fn catalog_id(&self) -> String
pub fn catalog_id(&self) -> String
Return the canonical source/id display form for this package id.
Sourcepub fn source(&self) -> PackageSource
pub fn source(&self) -> PackageSource
Return the upstream source associated with this package id.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PackageId
impl<'de> Deserialize<'de> for PackageId
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
impl Eq for PackageId
impl StructuralPartialEq for PackageId
Auto Trait Implementations§
impl Freeze for PackageId
impl RefUnwindSafe for PackageId
impl Send for PackageId
impl Sync for PackageId
impl Unpin for PackageId
impl UnwindSafe for PackageId
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