pub struct ModuleRegistry { /* private fields */ }Expand description
模块注册表
Implementations§
Source§impl ModuleRegistry
impl ModuleRegistry
pub fn new() -> Self
Sourcepub fn build_router(&self, prefix: &str) -> Router
pub fn build_router(&self, prefix: &str) -> Router
构建所有模块的路由
Sourcepub fn init_all(&self) -> CoolResult<()>
pub fn init_all(&self) -> CoolResult<()>
初始化所有模块
Sourcepub fn destroy_all(&self) -> CoolResult<()>
pub fn destroy_all(&self) -> CoolResult<()>
销毁所有模块
Sourcepub fn info_list(&self) -> Vec<ModuleInfo>
pub fn info_list(&self) -> Vec<ModuleInfo>
获取模块信息列表
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ModuleRegistry
impl !RefUnwindSafe for ModuleRegistry
impl Send for ModuleRegistry
impl Sync for ModuleRegistry
impl Unpin for ModuleRegistry
impl !UnwindSafe for ModuleRegistry
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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 more