pub struct PluginManifest {
pub name: String,
pub version: String,
pub executable: PathBuf,
pub allowed_env_vars: Vec<String>,
pub checksum_sha256: String,
}Fields§
§name: StringPlugin name as the host knows it (e.g. "doppler").
Matches the <name> in the manifest filename.
version: StringPlugin version, advisory only — logged and surfaced in
doctor output.
executable: PathBufPath to the executable, relative to the manifest’s directory unless absolute. The discovery layer canonicalises it before returning.
allowed_env_vars: Vec<String>Env vars the plugin is allowed to inherit from the host. Anything not on this list is stripped.
checksum_sha256: StringSHA-256 of the executable bytes, lower-case hex. The host refuses to spawn if the on-disk checksum doesn’t match.
Implementations§
Source§impl PluginManifest
impl PluginManifest
Sourcepub fn from_toml_str(
body: &str,
source_path: &Path,
) -> Result<Self, ManifestError>
pub fn from_toml_str( body: &str, source_path: &Path, ) -> Result<Self, ManifestError>
Parse a manifest from a TOML string. Cross-checks that
the declared name matches the filename convention.
Sourcepub fn load_from(path: &Path) -> Result<Self, ManifestError>
pub fn load_from(path: &Path) -> Result<Self, ManifestError>
Load + parse + name-cross-check a manifest from disk.
Sourcepub fn verify_executable(
&self,
manifest_dir: &Path,
) -> Result<PathBuf, ManifestError>
pub fn verify_executable( &self, manifest_dir: &Path, ) -> Result<PathBuf, ManifestError>
Resolve the executable path relative to the manifest’s directory, then verify the checksum on disk. Returns the canonicalised absolute path or an error.
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 moreSource§impl Debug for PluginManifest
impl Debug for PluginManifest
Source§impl<'de> Deserialize<'de> for PluginManifest
impl<'de> Deserialize<'de> for PluginManifest
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 PluginManifest
Source§impl PartialEq for PluginManifest
impl PartialEq for PluginManifest
Source§fn eq(&self, other: &PluginManifest) -> bool
fn eq(&self, other: &PluginManifest) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PluginManifest
impl Serialize for PluginManifest
impl StructuralPartialEq for PluginManifest
Auto Trait Implementations§
impl Freeze for PluginManifest
impl RefUnwindSafe for PluginManifest
impl Send for PluginManifest
impl Sync for PluginManifest
impl Unpin for PluginManifest
impl UnsafeUnpin for PluginManifest
impl UnwindSafe for PluginManifest
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.