pub struct QappManifest {Show 13 fields
pub id: String,
pub name: String,
pub short_name: String,
pub version: String,
pub description: String,
pub kind: QappKind,
pub capabilities: Vec<Capability>,
pub entry_wasm: WasmRef,
pub icons: Vec<IconRef>,
pub theme_color: String,
pub background_color: String,
pub display: String,
pub offline: bool,
}Expand description
The transport-neutral definition of a qapp. Everything a PWA generator or a delivery layer needs to describe, present, and integrity-check the qapp — without knowing how it is served.
Fields§
§id: StringReverse-DNS-ish stable id, e.g. "coop.qualia.journal".
name: StringHuman-facing full name.
short_name: StringShort name for constrained surfaces (home screen), defaults to name.
version: StringSemver string, e.g. "0.1.0".
description: StringOne-line description.
kind: QappKindThe kind of qapp (extensible).
capabilities: Vec<Capability>Least-privilege scopes requested. Empty = nothing granted.
entry_wasm: WasmRefContent-addressed reference to the wasm bundle.
icons: Vec<IconRef>Icons for install / launch surfaces.
theme_color: StringPWA theme colour (CSS colour string).
background_color: StringPWA background colour (CSS colour string).
display: StringPWA display mode, e.g. "standalone", "fullscreen", "minimal-ui", "browser".
offline: boolWhether the qapp is expected to work offline (drives service-worker precache intent).
Implementations§
Source§impl QappManifest
impl QappManifest
Sourcepub fn new(id: impl Into<String>, name: impl Into<String>) -> Self
pub fn new(id: impl Into<String>, name: impl Into<String>) -> Self
Create a manifest with sane defaults. short_name defaults to name; the wasm ref,
icons, and capabilities start empty/least-privilege.
Sourcepub fn with_capability(self, capability: Capability) -> Self
pub fn with_capability(self, capability: Capability) -> Self
Add a requested capability (least-privilege: only add what is needed).
Sourcepub fn with_entry(self, entry_wasm: WasmRef) -> Self
pub fn with_entry(self, entry_wasm: WasmRef) -> Self
Set the content-addressed wasm reference.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set the description.
Sourcepub fn with_version(self, version: impl Into<String>) -> Self
pub fn with_version(self, version: impl Into<String>) -> Self
Set the version (semver string).
Sourcepub fn validate(&self) -> Result<(), Vec<String>>
pub fn validate(&self) -> Result<(), Vec<String>>
Validate the manifest, returning the full list of problems (empty = valid).
Hard errors: empty id, id without a dot (not reverse-DNS-ish), empty name, empty version. A manifest with no icons is reported as a problem (an icon is required for a usable install), consistent with the task’s rule that a manifest with no icon and no name must error — here we are stricter and always flag a missing icon, but the message is clearly an install-quality issue.