pub struct ConnectionStore { /* private fields */ }Expand description
Persistent storage for all connection data.
Implementations§
Source§impl ConnectionStore
impl ConnectionStore
Sourcepub fn open(path: &Path) -> ConnectResult<Self>
pub fn open(path: &Path) -> ConnectResult<Self>
Open or create a store at the given path.
Sourcepub fn open_memory() -> ConnectResult<Self>
pub fn open_memory() -> ConnectResult<Self>
Create an in-memory store (for testing).
Sourcepub fn save_connection(&self, conn: &Connection) -> ConnectResult<()>
pub fn save_connection(&self, conn: &Connection) -> ConnectResult<()>
Save a connection.
Sourcepub fn get_connection(
&self,
id: &ConnectionId,
) -> ConnectResult<Option<Connection>>
pub fn get_connection( &self, id: &ConnectionId, ) -> ConnectResult<Option<Connection>>
Get a connection by ID.
Sourcepub fn list_connections(
&self,
tag: Option<&str>,
) -> ConnectResult<Vec<Connection>>
pub fn list_connections( &self, tag: Option<&str>, ) -> ConnectResult<Vec<Connection>>
List all connections, optionally filtered by tag.
Sourcepub fn delete_connection(&self, id: &ConnectionId) -> ConnectResult<bool>
pub fn delete_connection(&self, id: &ConnectionId) -> ConnectResult<bool>
Delete a connection by ID.
Sourcepub fn save_profile(&self, profile: &ConnectionProfile) -> ConnectResult<()>
pub fn save_profile(&self, profile: &ConnectionProfile) -> ConnectResult<()>
Save a connection profile (soul).
Sourcepub fn get_profile(
&self,
conn_id: &ConnectionId,
) -> ConnectResult<Option<ConnectionProfile>>
pub fn get_profile( &self, conn_id: &ConnectionId, ) -> ConnectResult<Option<ConnectionProfile>>
Get a connection profile by connection ID.
Sourcepub fn save_health_check(&self, check: &HealthCheck) -> ConnectResult<()>
pub fn save_health_check(&self, check: &HealthCheck) -> ConnectResult<()>
Save a health check result.
Sourcepub fn get_health_history(
&self,
conn_id: &ConnectionId,
limit: usize,
) -> ConnectResult<Vec<HealthCheck>>
pub fn get_health_history( &self, conn_id: &ConnectionId, limit: usize, ) -> ConnectResult<Vec<HealthCheck>>
Get recent health checks for a connection.
Sourcepub fn stats(&self) -> ConnectResult<StoreStats>
pub fn stats(&self) -> ConnectResult<StoreStats>
Stats summary.
Auto Trait Implementations§
impl !Freeze for ConnectionStore
impl !RefUnwindSafe for ConnectionStore
impl !Sync for ConnectionStore
impl !UnwindSafe for ConnectionStore
impl Send for ConnectionStore
impl Unpin for ConnectionStore
impl UnsafeUnpin for ConnectionStore
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