pub enum Error {
Show 19 variants
PluginNotFound(String),
PluginAlreadyLoaded(String),
InvalidManifest(String),
MissingManifestField(String),
ApiVersionMismatch {
required: String,
provided: String,
},
MissingCapability(String),
UndeclaredCapability(String),
DependencyNotSatisfied {
name: String,
version: String,
},
InitializationFailed(String),
ExecutionFailed(String),
InvalidState {
expected: String,
actual: String,
},
FunctionNotFound(String),
Compilation(String),
Io(Error),
Host(Error),
ManifestParse(String),
PluginUnloaded,
ReloadFailed(String),
Registry(String),
}Expand description
Errors that can occur during plugin operations.
Variants§
PluginNotFound(String)
Plugin not found.
PluginAlreadyLoaded(String)
Plugin already loaded.
InvalidManifest(String)
Invalid manifest.
MissingManifestField(String)
Missing required field in manifest.
ApiVersionMismatch
API version mismatch.
MissingCapability(String)
Missing required capability.
UndeclaredCapability(String)
Capability not declared in manifest.
DependencyNotSatisfied
Dependency not satisfied.
InitializationFailed(String)
Plugin initialization failed.
ExecutionFailed(String)
Plugin execution failed.
InvalidState
Plugin already in invalid state for operation.
FunctionNotFound(String)
Function not found in plugin.
Compilation(String)
Compilation error.
Io(Error)
IO error.
Host(Error)
Host error.
ManifestParse(String)
Manifest parse error.
PluginUnloaded
Plugin was unloaded.
ReloadFailed(String)
Plugin reload failed.
Registry(String)
Registry error.
Implementations§
Source§impl Error
impl Error
Sourcepub fn plugin_not_found(name: impl Into<String>) -> Self
pub fn plugin_not_found(name: impl Into<String>) -> Self
Create a plugin not found error.
Sourcepub fn invalid_manifest(msg: impl Into<String>) -> Self
pub fn invalid_manifest(msg: impl Into<String>) -> Self
Create an invalid manifest error.
Sourcepub fn missing_field(field: impl Into<String>) -> Self
pub fn missing_field(field: impl Into<String>) -> Self
Create a missing manifest field error.
Sourcepub fn api_version_mismatch(
required: impl Into<String>,
provided: impl Into<String>,
) -> Self
pub fn api_version_mismatch( required: impl Into<String>, provided: impl Into<String>, ) -> Self
Create an API version mismatch error.
Sourcepub fn missing_capability(cap: impl Into<String>) -> Self
pub fn missing_capability(cap: impl Into<String>) -> Self
Create a missing capability error.
Sourcepub fn dependency_not_satisfied(
name: impl Into<String>,
version: impl Into<String>,
) -> Self
pub fn dependency_not_satisfied( name: impl Into<String>, version: impl Into<String>, ) -> Self
Create a dependency not satisfied error.
Sourcepub fn init_failed(msg: impl Into<String>) -> Self
pub fn init_failed(msg: impl Into<String>) -> Self
Create an initialization failed error.
Sourcepub fn execution_failed(msg: impl Into<String>) -> Self
pub fn execution_failed(msg: impl Into<String>) -> Self
Create an execution failed error.
Sourcepub fn invalid_state(
expected: impl Into<String>,
actual: impl Into<String>,
) -> Self
pub fn invalid_state( expected: impl Into<String>, actual: impl Into<String>, ) -> Self
Create an invalid state error.
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Returns true if this error is recoverable.
Sourcepub fn should_reload(&self) -> bool
pub fn should_reload(&self) -> bool
Returns true if this error should trigger a reload.