pub enum AddonLoaderError {
AddonNotFound(String),
AddonDisabled(String),
ControllerNotFound(String),
ActionNotFound(String),
ManifestParse {
addon: String,
reason: String,
},
ScanDir {
path: String,
source: Error,
},
ReadFile {
path: String,
source: Error,
},
AutoloadMiss {
class: String,
},
HookRegister {
hook: String,
addon: String,
},
RouteParse {
url: String,
reason: String,
},
}Expand description
插件加载器错误
Variants§
AddonNotFound(String)
插件不存在(对齐 PHP HttpException(404, 'addon %s not found'))
AddonDisabled(String)
插件已禁用(对齐 PHP HttpException(500, 'addon %s is disabled'))
ControllerNotFound(String)
控制器不存在(对齐 PHP HttpException(404, 'addon controller %s not found'))
ActionNotFound(String)
操作不存在(对齐 PHP HttpException(404, 'addon action %s not found'))
ManifestParse
插件清单解析失败(Plugin.php 中 $info 数组格式错误)
ScanDir
插件目录扫描失败(IO 错误)
ReadFile
文件读取失败
AutoloadMiss
自动加载类映射失败(对齐 PHP spl_autoload_register 找不到文件时返回 false)
HookRegister
钩子注册失败
RouteParse
路由解析失败
Trait Implementations§
Source§impl Debug for AddonLoaderError
impl Debug for AddonLoaderError
Source§impl Display for AddonLoaderError
impl Display for AddonLoaderError
Source§impl Error for AddonLoaderError
impl Error for AddonLoaderError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for AddonLoaderError
impl !UnwindSafe for AddonLoaderError
impl Freeze for AddonLoaderError
impl Send for AddonLoaderError
impl Sync for AddonLoaderError
impl Unpin for AddonLoaderError
impl UnsafeUnpin for AddonLoaderError
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