pub struct Kernel { /* private fields */ }Expand description
内核结构体,是工业协议应用的入口点。
通过 KernelBuilder 构建,使用 Builder 模式配置协议、连接策略等参数,
然后调用 boot 启动,使用完毕后调用 shutdown 关闭。
Implementations§
Source§impl Kernel
impl Kernel
Sourcepub fn builder() -> KernelBuilder
pub fn builder() -> KernelBuilder
创建内核构建器。
Sourcepub fn protocol_registry(&self) -> &ProtocolRegistry
pub fn protocol_registry(&self) -> &ProtocolRegistry
获取协议注册表的只读引用。
Sourcepub fn connection_manager(&self) -> &ConnectionManager
pub fn connection_manager(&self) -> &ConnectionManager
获取连接管理器的只读引用。
Sourcepub fn config(&self) -> &ConfigRepository
pub fn config(&self) -> &ConfigRepository
Sourcepub fn gateway(&self) -> &GatewayEngine
pub fn gateway(&self) -> &GatewayEngine
获取网关引擎的只读引用。
Sourcepub fn gateway_mut(&mut self) -> &mut GatewayEngine
pub fn gateway_mut(&mut self) -> &mut GatewayEngine
获取网关引擎的可变引用。
Auto Trait Implementations§
impl !Freeze for Kernel
impl !RefUnwindSafe for Kernel
impl !UnwindSafe for Kernel
impl Send for Kernel
impl Sync for Kernel
impl Unpin for Kernel
impl UnsafeUnpin for Kernel
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