AppxManifestBuilder

Struct AppxManifestBuilder 

Source
pub struct AppxManifestBuilder { /* private fields */ }
Expand description

Builder for creating an AppxManifest.

Implementations§

Source§

impl AppxManifestBuilder

Source

pub fn new() -> Self

Creates a new AppxManifestBuilder with default values.

Source

pub fn id(self, id: impl Into<String>) -> Self

Sets the identity name. This is the unique identifier for the app. See: https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-identity#attributes

Source

pub fn publisher_id(self, publisher_id: impl Into<String>) -> Self

Sets the publisher identity. Defaults to “CN=Unknown” if not set. See: https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-identity#attributes

Source

pub fn version(self, version: impl Into<String>) -> Self

Sets the version of the app. The version should be in the format “x.y.z.p”. X mustn’t be zero when publishing. See: https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-identity#attributes Defaults to the value of CARGO_PKG_VERSION, stripped of any suffixes, and with a “.0” suffix added. For example, if CARGO_PKG_VERSION is “1.2.3-alpha”, the version will be “1.2.3.0”.

Sets the logo path. Defaults to Assets\StoreLogo.png if not set.

Source

pub fn display_name(self, display_name: impl Into<String>) -> Self

Sets the display name of the app. Defaults to the identity name if not set.

Source

pub fn publisher_display_name( self, publisher_display_name: impl Into<String>, ) -> Self

Sets the publisher display name. Defaults to “Unknown” if not set.

Source

pub fn description(self, description: impl Into<String>) -> Self

Sets the description of the app.

Source

pub fn executable(self, executable: impl Into<String>) -> Self

Sets the executable path. infer_executable will be used if not set which defaults to CARGO_BIN_NAME.exe, however it’s very unusable. Normally should be $YOUR_CRATE_NAME.exe.

Source

pub fn arguments(self, arguments: impl Into<String>) -> Self

Sets the arguments for the executable when executing. Defaults to -RegisterAsComServer if not set. This argument is used to register the COM server for the extension.

Source

pub fn class( self, class_id: impl Into<String>, display_name: Option<&str>, ) -> Self

Adds a extension class with a string class GUID. The display name is optional and will default to the display name of the app if not provided. It’s recommended to provide a display name when registering multiple extension classes.

Source

pub fn class_u128(self, class_id: u128, display_name: Option<&str>) -> Self

Adds a extension class with a u128 class GUID. The display name is optional and will default to the display name of the app if not provided. It’s recommended to provide a display name when registering multiple extension classes.

Source

pub fn build(self) -> AppxManifest

Builds the AppxManifest with the provided values.

Trait Implementations§

Source§

impl Default for AppxManifestBuilder

Source§

fn default() -> AppxManifestBuilder

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

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, 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.