pub enum PluginError {
LoadError {
message: String,
},
ExecutionError {
message: String,
},
SecurityViolation {
violation: String,
},
ResourceLimitExceeded {
resource: String,
limit: String,
used: String,
},
InvalidConfiguration {
field: String,
message: String,
},
CompatibilityError {
reason: String,
},
CommunicationError {
message: String,
},
TimeoutError {
timeout_ms: u64,
},
WasmError {
message: String,
},
InvalidManifest {
message: String,
},
DependencyError {
dependency: String,
message: String,
},
SystemError {
message: String,
},
}
Expand description
Comprehensive error types for the plugin system
Variants§
LoadError
Plugin loading or validation failed
ExecutionError
Plugin execution failed
SecurityViolation
Plugin violated security constraints
ResourceLimitExceeded
Plugin exceeded resource limits
Fields
InvalidConfiguration
Plugin configuration is invalid
Fields
CompatibilityError
Plugin is incompatible with current system
CommunicationError
Plugin communication failed
TimeoutError
Plugin timed out
WasmError
WebAssembly runtime error
InvalidManifest
Plugin manifest is invalid
DependencyError
Plugin dependency not found or incompatible
Fields
SystemError
Generic plugin system error
Implementations§
Source§impl PluginError
impl PluginError
Sourcepub fn load<S>(message: S) -> PluginError
pub fn load<S>(message: S) -> PluginError
Create a load error
Sourcepub fn execution<S>(message: S) -> PluginError
pub fn execution<S>(message: S) -> PluginError
Create an execution error
Sourcepub fn security<S>(violation: S) -> PluginError
pub fn security<S>(violation: S) -> PluginError
Create a security violation error
Sourcepub fn resource_limit<S>(resource: S, limit: S, used: S) -> PluginError
pub fn resource_limit<S>(resource: S, limit: S, used: S) -> PluginError
Create a resource limit error
Sourcepub fn config<S>(field: S, message: S) -> PluginError
pub fn config<S>(field: S, message: S) -> PluginError
Create a configuration error
Sourcepub fn compatibility<S>(reason: S) -> PluginError
pub fn compatibility<S>(reason: S) -> PluginError
Create a compatibility error
Sourcepub fn communication<S>(message: S) -> PluginError
pub fn communication<S>(message: S) -> PluginError
Create a communication error
Sourcepub fn timeout(timeout_ms: u64) -> PluginError
pub fn timeout(timeout_ms: u64) -> PluginError
Create a timeout error
Sourcepub fn wasm<S>(message: S) -> PluginError
pub fn wasm<S>(message: S) -> PluginError
Create a WASM error
Sourcepub fn manifest<S>(message: S) -> PluginError
pub fn manifest<S>(message: S) -> PluginError
Create a manifest error
Sourcepub fn dependency<S>(dependency: S, message: S) -> PluginError
pub fn dependency<S>(dependency: S, message: S) -> PluginError
Create a dependency error
Sourcepub fn system<S>(message: S) -> PluginError
pub fn system<S>(message: S) -> PluginError
Create a system error
Sourcepub fn is_security_error(&self) -> bool
pub fn is_security_error(&self) -> bool
Check if this is a security-related error
Sourcepub fn is_resource_error(&self) -> bool
pub fn is_resource_error(&self) -> bool
Check if this is a resource-related error
Sourcepub fn is_timeout_error(&self) -> bool
pub fn is_timeout_error(&self) -> bool
Check if this is a timeout error
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
Auto Trait Implementations§
impl Freeze for PluginError
impl RefUnwindSafe for PluginError
impl Send for PluginError
impl Sync for PluginError
impl Unpin for PluginError
impl UnwindSafe for PluginError
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self
file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self
file descriptor. Read moreSource§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