Skip to main content

PersistenceStore

Trait PersistenceStore 

Source
pub trait PersistenceStore:
    MessageStore
    + ApiCallStore
    + SessionStore
    + ProviderStore
    + AgentStore {
    // Required methods
    fn backend_name(&self) -> &str;
    fn is_connected(&self) -> bool;
    fn close(&self) -> impl Future<Output = Result<(), PersistenceError>> + Send;
}
Expand description

完整的持久化存储 trait

组合所有存储能力

Required Methods§

Source

fn backend_name(&self) -> &str

获取存储后端名称

Source

fn is_connected(&self) -> bool

检查连接状态

Source

fn close(&self) -> impl Future<Output = Result<(), PersistenceError>> + Send

关闭连接

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§