pub struct SqliteCapability { /* private fields */ }Expand description
SQLite 嵌入式数据库能力
实现 Capability trait,可被 UniStore 运行时管理
Implementations§
Source§impl SqliteCapability
impl SqliteCapability
Sourcepub fn with_config(config: SqliteConfig) -> Self
pub fn with_config(config: SqliteConfig) -> Self
使用自定义配置创建
Sourcepub fn db(&self) -> Option<&EmbeddedDb>
pub fn db(&self) -> Option<&EmbeddedDb>
获取数据库(能力必须已启动)
Trait Implementations§
Source§impl Capability for SqliteCapability
impl Capability for SqliteCapability
Source§fn info(&self) -> CapabilityInfo
fn info(&self) -> CapabilityInfo
获取能力的元数据信息 Read more
Source§fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
启动能力 Read more
Source§fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
停止能力 Read more
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
健康检查 Read more
Source§fn supports_hot_reload(&self) -> bool
fn supports_hot_reload(&self) -> bool
能力是否支持热重载 Read more
Auto Trait Implementations§
impl Freeze for SqliteCapability
impl !RefUnwindSafe for SqliteCapability
impl Send for SqliteCapability
impl Sync for SqliteCapability
impl Unpin for SqliteCapability
impl !UnwindSafe for SqliteCapability
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