pub enum PluginError {
ResolutionFailed {
message: String,
},
InvalidToken {
token: String,
},
ConfigurationError {
message: String,
},
Timeout,
PermissionDenied {
action: String,
},
DependencyMissing {
dependency: String,
},
InternalError {
message: String,
},
ExecutionError {
message: String,
},
SecurityViolation {
violation: String,
},
WasmError {
message: String,
},
WasmRuntimeError(Error),
}Expand description
Core plugin error types
Variants§
ResolutionFailed
Token resolution failed with a specific error message
InvalidToken
Invalid token format was encountered
ConfigurationError
Plugin configuration is invalid or missing
Timeout
Plugin execution exceeded the timeout limit
PermissionDenied
Plugin attempted an action it doesn’t have permission for
DependencyMissing
A required plugin dependency is missing
InternalError
Internal plugin error
ExecutionError
Plugin execution failed
SecurityViolation
Security policy violation
WasmError
WASM module loading or initialization error
WasmRuntimeError(Error)
WASM runtime error
Implementations§
Source§impl PluginError
Additional convenience constructors for PluginError.
impl PluginError
Additional convenience constructors for PluginError.
The core constructors (execution, security, wasm) live in types.rs.
Sourcepub fn load<S>(message: S) -> PluginError
pub fn load<S>(message: S) -> PluginError
Create a load error
Sourcepub fn config<S>(field: S, message: S) -> PluginError
pub fn config<S>(field: S, message: S) -> PluginError
Create a configuration error (field + message)
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 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_timeout_error(&self) -> bool
pub fn is_timeout_error(&self) -> bool
Check if this is a timeout error
Source§impl PluginError
impl PluginError
Sourcepub fn resolution_failed(message: &str) -> PluginError
pub fn resolution_failed(message: &str) -> PluginError
Creates a new resolution failed error
Sourcepub fn invalid_token(token: &str) -> PluginError
pub fn invalid_token(token: &str) -> PluginError
Creates a new invalid token error
Sourcepub fn config_error(message: &str) -> PluginError
pub fn config_error(message: &str) -> PluginError
Creates a new configuration error
Sourcepub fn execution<S>(message: S) -> PluginError
pub fn execution<S>(message: S) -> PluginError
Creates a new execution error
Sourcepub fn security<S>(violation: S) -> PluginError
pub fn security<S>(violation: S) -> PluginError
Creates a new security violation error
Sourcepub fn wasm<S>(message: S) -> PluginError
pub fn wasm<S>(message: S) -> PluginError
Creates a new WASM 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
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<&str> for PluginError
impl From<&str> for PluginError
Source§fn from(message: &str) -> PluginError
fn from(message: &str) -> PluginError
Source§impl From<Error> for PluginError
impl From<Error> for PluginError
Source§fn from(source: Error) -> PluginError
fn from(source: Error) -> PluginError
Source§impl From<Error> for PluginError
impl From<Error> for PluginError
Source§fn from(error: Error) -> PluginError
fn from(error: Error) -> PluginError
Source§impl From<Error> for PluginError
impl From<Error> for PluginError
Source§fn from(error: Error) -> PluginError
fn from(error: Error) -> PluginError
Source§impl From<String> for PluginError
impl From<String> for PluginError
Source§fn from(message: String) -> PluginError
fn from(message: String) -> PluginError
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§
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