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()
Source§impl From<Error> for AddonLoaderError
impl From<Error> for AddonLoaderError
Source§fn from(err: Error) -> AddonLoaderError
fn from(err: Error) -> AddonLoaderError
Converts to this type from the input type.
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
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.