pub enum VtxError {
DatabaseError(String),
SerializationError(String),
AuthDenied(u16),
PermissionDenied(String),
NotFound(String),
Internal(String),
}Expand description
Plugin runtime error type (unified error model).
Defines all known errors that may occur during plugin execution. All errors support serialization and can be used for HTTP responses or log transmission.
Variants§
DatabaseError(String)
Underlying database error (e.g., SQL execution failure, constraint conflicts).
SerializationError(String)
Serialization or deserialization failure (e.g., JSON format mismatch).
AuthDenied(u16)
Authentication failed (includes suggested HTTP status code, e.g., 401 / 403).
PermissionDenied(String)
Insufficient permissions (e.g., attempting a write operation in a read-only environment).
NotFound(String)
Resource not found (e.g., file, video, or user not found).
Internal(String)
Internal plugin logic error (fallback type).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for VtxError
impl<'de> Deserialize<'de> for VtxError
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Error for VtxError
impl Error for VtxError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl VtxErrorExt for VtxError
impl VtxErrorExt for VtxError
fn is_permission_denied(&self) -> bool
Auto Trait Implementations§
impl Freeze for VtxError
impl RefUnwindSafe for VtxError
impl Send for VtxError
impl Sync for VtxError
impl Unpin for VtxError
impl UnwindSafe for VtxError
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
Mutably borrows from an owned value. Read more