#[non_exhaustive]pub enum PluginError {
Show 16 variants
ManifestParse(String),
AbiUnsupported {
plugin: String,
required: String,
supported: Vec<u64>,
},
CapabilityRequired(Capability),
CapabilityDenied(Capability),
DuplicateRegistration(QName),
DependencyMissing {
dependent: String,
dep_id: String,
req: String,
},
DependencyCycle(Vec<String>),
SignatureInvalid(String),
HashMismatch {
expected: String,
actual: String,
},
WasmInstantiate(String),
LuaParse(String),
RhaiParse(String),
InvalidQName(String),
LogicalTypeConflict(String),
StorageSchemeConflict(String),
Internal(String),
}Expand description
Errors surfaced by the plugin framework itself.
PluginError covers framework operations: manifest parsing, capability
checks, registration validation, dependency resolution, WASM loading,
signing. Per-invocation errors from plugin code are represented by
FnError instead.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ManifestParse(String)
The supplied manifest could not be parsed.
AbiUnsupported
The manifest’s abi range does not intersect any host-supported major.
Fields
CapabilityRequired(Capability)
A registration was attempted without the required capability.
CapabilityDenied(Capability)
A capability the plugin requested was denied by the host loader.
DuplicateRegistration(QName)
Two registrations attempted to claim the same qualified name.
DependencyMissing
A depends_on entry referenced a missing or version-incompatible plugin.
Fields
DependencyCycle(Vec<String>)
A cycle was detected in the dependency graph.
SignatureInvalid(String)
The manifest’s signature failed verification against the trust root.
HashMismatch
The plugin’s hash did not match the pinned blake3 digest.
Fields
WasmInstantiate(String)
WASM component instantiation failed (loader-side).
LuaParse(String)
Lua source parse / compile failed.
RhaiParse(String)
Rhai source parse / compile failed.
InvalidQName(String)
A qualified name failed to parse.
LogicalTypeConflict(String)
A logical type registration conflicted with an existing extension type.
StorageSchemeConflict(String)
Storage scheme already registered.
Internal(String)
Catch-all for genuinely internal errors that don’t map to a variant above.
Implementations§
Source§impl PluginError
impl PluginError
Sourcepub fn internal(message: impl Into<String>) -> Self
pub fn internal(message: impl Into<String>) -> Self
Construct an PluginError::Internal with a descriptive message.
Trait Implementations§
Source§impl Debug for PluginError
impl Debug for PluginError
Source§impl Display for PluginError
impl Display for PluginError
Source§impl Error for PluginError
impl Error for PluginError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<PluginError> for ReloadError
impl From<PluginError> for ReloadError
Source§fn from(source: PluginError) -> Self
fn from(source: PluginError) -> Self
Auto Trait Implementations§
impl Freeze for PluginError
impl RefUnwindSafe for PluginError
impl Send for PluginError
impl Sync for PluginError
impl Unpin for PluginError
impl UnsafeUnpin for PluginError
impl UnwindSafe for PluginError
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>
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