#[non_exhaustive]pub struct About {
pub pkg_name: Txt,
pub pkg_authors: Box<[Txt]>,
pub version: Version,
pub app_id: Txt,
pub app: Txt,
pub org: Txt,
pub description: Txt,
pub homepage: Txt,
pub license: Txt,
pub has_about: bool,
pub meta: Vec<(Txt, Txt)>,
pub is_test: bool,
}Expand description
Metadata about the app and main crate.
See about for more details.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pkg_name: Txtpackage.name
Cargo crate name for the entry crate.
package.authors
Cargo crate authors for the entry crate.
version: Versionpackage.version
Cargo crate version for the entry crate.
app_id: Txtpackage.metadata.zng.about.app_id
Fully qualified unique name for the application. Is a list of one or more dot-separated identifiers, each identifier starts with letter, identifiers contains only letters, digits and underscore. A reverse DNS name is recommended.
If the metadata is not set an id is derived from "qualifier", org and app values.
app: Txtpackage.metadata.zng.about.app
App display name.
If the metadata is not set the pkg_name is used.
org: Txtpackage.metadata.zng.about.org
Organization display name.
If the metadata is not set the first pkg_authors is used.
description: Txtpackage.description
Short description of the app.
homepage: Txtpackage.homepage
Valid website about the app.
license: Txtpackage.license
License title of the app.
has_about: boolIf package.metadata.zng.about is set on the Cargo.toml manifest.
The presence of this section is used by cargo zng res to find the main
crate if the workspace has multiple bin crates.
meta: Vec<(Txt, Txt)>package.metadata.zng.about.*
Any other unknown string metadata.
is_test: boolIf app was started in a cfg(test) build binary.
Implementations§
Source§impl About
impl About
Sourcepub fn crate_name(&self) -> Txt
pub fn crate_name(&self) -> Txt
The pkg_name in snake_case.
Sourcepub fn qualifier(&self) -> Txt
pub fn qualifier(&self) -> Txt
The first components of app_id except the last two.
For app id "br.com.company.product" the qualifier is "br.com". For id "company.product" the qualifier is empty.
Sourcepub fn get(&self, key: &str) -> Option<Txt>
pub fn get(&self, key: &str) -> Option<Txt>
Get the value.
The key can be an entry of meta, the name of a field or the name of a value method.
Sourcepub fn windows_aumid(&self) -> Txt
pub fn windows_aumid(&self) -> Txt
Get the Windows AppUserModelID.
This ID identifies the app for shell integration, like notifications. A shortcut
on the Start Menu must define a System.AppUserModel.ID that matches this ID.
By default this is the app_id, its strongly recommended that the app only use one ID, but if required
the AUMID can be explicitly set on the metadata using the "windows_aumid".
On startup the default view-process calls SetCurrentProcessExplicitAppUserModelID to ensure the GUI
is associated with the Start Menu entry even when not running from the start menu.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for About
impl<'de> Deserialize<'de> for About
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>,
impl Eq for About
impl StructuralPartialEq for About
Auto Trait Implementations§
impl Freeze for About
impl RefUnwindSafe for About
impl Send for About
impl Sync for About
impl Unpin for About
impl UnsafeUnpin for About
impl UnwindSafe for About
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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