pub struct Manifest {
package: Meta,
}Expand description
Represents the package section of a Cargo.toml manifest.
This struct contains metadata extracted from the [package] section
of a Cargo.toml file. It is used for deserializing TOML content using
the toml crate’s deserialization functionality.
Currently, this struct only extracts the version information, which is needed for updating the Tauri configuration file with the correct version during the build process.
§TOML Format
The expected TOML structure:
[package]
name = "Mountain"
version = "1.0.0"
# ... other fields§Fields
- package: Contains the metadata extracted from the package section
Fields§
§package: MetaRepresents metadata within the package section of Cargo.toml.
This nested struct contains the individual metadata fields from the package section, including the version string.
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn get_version(&self) -> &str
pub fn get_version(&self) -> &str
Retrieves the version string from the manifest.
This method provides access to the version field, which is stored privately. The version is used when updating the Tauri configuration file during the build process.
§Returns
A string slice containing the version number.
§Example
use crate::Maintain::Source::Build::Definition;
let version = manifest.get_version();
println!("Application version: {}", version);