pub struct PortableAppManifest {
pub identity: AppIdentity,
pub entries: Vec<EntryProjection>,
pub required_capabilities: Vec<RequiredCapability>,
pub required_assets: Vec<RequiredAsset>,
pub state_schema: StateSchema,
pub permission_intents: Vec<PermissionIntent>,
pub presentation_hints: Vec<PresentationHint>,
pub compatibility: Compatibility,
pub integrity: Integrity,
pub update_channel: UpdateChannel,
}Expand description
Versioned portable application manifest v1.
Field order on this struct is the canonical serialization order.
Fields§
§identity: AppIdentity§entries: Vec<EntryProjection>§required_capabilities: Vec<RequiredCapability>§required_assets: Vec<RequiredAsset>§state_schema: StateSchema§permission_intents: Vec<PermissionIntent>§presentation_hints: Vec<PresentationHint>Layout / theme suggestions only — never authority (see permissions module).
compatibility: Compatibility§integrity: Integrity§update_channel: UpdateChannelImplementations§
Source§impl PortableAppManifest
impl PortableAppManifest
Sourcepub fn encode(&self) -> Result<Vec<u8>, AppManifestError>
pub fn encode(&self) -> Result<Vec<u8>, AppManifestError>
Deterministic little-endian encode. Fails if validation or size budget fails.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, AppManifestError>
pub fn decode(bytes: &[u8]) -> Result<Self, AppManifestError>
Decode and re-validate. Unknown versions and permissions fail closed.
Sourcepub fn manifest_digest(&self) -> Result<[u8; 32], AppManifestError>
pub fn manifest_digest(&self) -> Result<[u8; 32], AppManifestError>
Deterministic SHA-256 of the encoded canonical bytes.
Source§impl PortableAppManifest
impl PortableAppManifest
Sourcepub fn validate(&self) -> Result<(), AppManifestError>
pub fn validate(&self) -> Result<(), AppManifestError>
Fail closed on missing identity, unknown projection paths, oversize lists, empty integrity, or unsafe path fields.
Sourcepub fn verify_package_digest(
&self,
digest: &[u8; 32],
) -> Result<(), AppManifestError>
pub fn verify_package_digest( &self, digest: &[u8; 32], ) -> Result<(), AppManifestError>
Verify a package payload digest against the integrity block.
Trait Implementations§
Source§impl Clone for PortableAppManifest
impl Clone for PortableAppManifest
Source§impl Debug for PortableAppManifest
impl Debug for PortableAppManifest
Source§impl<'de> Deserialize<'de> for PortableAppManifest
impl<'de> Deserialize<'de> for PortableAppManifest
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PortableAppManifest
Source§impl PartialEq for PortableAppManifest
impl PartialEq for PortableAppManifest
Source§impl Serialize for PortableAppManifest
impl Serialize for PortableAppManifest
impl StructuralPartialEq for PortableAppManifest
Auto Trait Implementations§
impl Freeze for PortableAppManifest
impl RefUnwindSafe for PortableAppManifest
impl Send for PortableAppManifest
impl Sync for PortableAppManifest
impl Unpin for PortableAppManifest
impl UnsafeUnpin for PortableAppManifest
impl UnwindSafe for PortableAppManifest
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.§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
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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 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> ⓘ
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