pub struct PluginManifest {
pub name: &'static str,
pub crate_name: &'static str,
pub version: &'static str,
pub framework: FrameworkId,
pub source: PluginSource,
pub mode: PluginMode,
pub checksum: &'static str,
pub signature: Option<&'static str>,
pub public_key_fingerprint: Option<&'static str>,
pub revocation_list: Option<&'static str>,
}Expand description
Plugin manifest metadata. 插件 manifest 元数据。
Fields§
§name: &'static strManifest name; trust and lock checks match on this package identity. manifest 名称;信任与锁检查以它作为包身份匹配。
crate_name: &'static strRust crate that carries the plugin implementation. 承载插件实现的 Rust crate。
version: &'static strDeclared plugin version. 声明的插件版本。
framework: FrameworkIdHost framework the plugin targets. 插件针对的宿主框架。
source: PluginSourceTrust lane the plugin came from. 插件的来源信任通道。
mode: PluginModeWhether the plugin extends or replaces a slot. 插件是扩展还是替换插槽。
checksum: &'static strDigest of the plugin bytes, optionally carrying a sha256: prefix.
插件字节的摘要,可带 sha256: 前缀。
signature: Option<&'static str>Hex-encoded Ed25519 signature over signing_payload, when supplied.
signing_payload 上的十六进制 Ed25519 签名;插件没有签名时为 None。
public_key_fingerprint: Option<&'static str>Fingerprint of the public key used for the signature. 用于签名的公钥指纹。
revocation_list: Option<&'static str>Identifier of the revocation-list snapshot used by the publisher. 发布者使用的撤销列表快照标识。
Implementations§
Source§impl PluginManifest
impl PluginManifest
Sourcepub fn targets(self, framework: FrameworkId) -> bool
pub fn targets(self, framework: FrameworkId) -> bool
Whether the manifest names exactly this framework. manifest 指明的框架是否就是这一个。
Sourcepub fn verify_bytes(self, bytes: &[u8]) -> bool
pub fn verify_bytes(self, bytes: &[u8]) -> bool
Verify the manifest digest against plugin bytes before native loading. 在 native 加载前,用插件字节验证 manifest 摘要。
Trait Implementations§
Source§impl Clone for PluginManifest
impl Clone for PluginManifest
Source§fn clone(&self) -> PluginManifest
fn clone(&self) -> PluginManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more