Struct VersionManifest

Source
pub struct VersionManifest {
    pub package_identifier: PackageIdentifier,
    pub package_version: PackageVersion,
    pub default_locale: LanguageTag,
    pub manifest_type: ManifestType,
    pub manifest_version: ManifestVersion,
}

Fields§

§package_identifier: PackageIdentifier

The unique identifier for a given package.

This value is generally in the form of Publisher.Package. It is case-sensitive, and this value must match the folder structure under the partition directory in GitHub.

§package_version: PackageVersion

The version of the package.

It is related to the specific release this manifests targets. In some cases you will see a perfectly formed semantic version number, and in other cases you might see something different. These may be date driven, or they might have other characters with some package specific meaning for example.

The Windows Package Manager client uses this version to determine if an upgrade for a package is available. In some cases, packages may be released with a marketing driven version, and that causes trouble with the winget upgrade command.

The current best practice is to use the value reported in Add / Remove Programs when this version of the package is installed. In some cases, packages do not report a version resulting in an upgrade loop or other unwanted behavior.

§default_locale: LanguageTag

The default locale for package meta-data.

The format is BCP-47. This value identifies the language for meta-data to be displayed to a user when no locale file matching their preferences is available.

The validation pipelines use this value to ensure the corresponding locale file is present and conforms with the defaultLocale YAML specification.

§manifest_type: ManifestType

The manifest type.

Must have the value version. The Microsoft community package repository validation pipelines also use this value to determine appropriate validation rules when evaluating this file.

§manifest_version: ManifestVersion

The manifest syntax version.

Must have the value 1.10.0. The Microsoft community package repository validation pipelines also use this value to determine appropriate validation rules when evaluating this file.

Implementations§

Source§

impl VersionManifest

Source

pub fn update(&mut self, package_version: &PackageVersion)

Trait Implementations§

Source§

impl Default for VersionManifest

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Manifest for VersionManifest

Source§

const SCHEMA: &'static str = "https://aka.ms/winget-manifest.version.1.10.0.schema.json"

Source§

const TYPE: ManifestType = ManifestType::Version

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T