pub struct PooledConnection {
pub client: FtpClient,
pub key: ConnectionKey,
pub created_at: Instant,
pub last_used: Instant,
pub reuse_count: u64,
pub mode: FtpMode,
}Expand description
Pooled FTP connection with metadata
Fields§
§client: FtpClientThe actual FTP client
key: ConnectionKeyConnection key for identification
created_at: InstantWhen this connection was created
last_used: InstantWhen this connection was last used
reuse_count: u64Number of times this connection has been reused
mode: FtpModeConnection mode (passive/active)
Implementations§
Source§impl PooledConnection
impl PooledConnection
Sourcepub fn new(client: FtpClient, key: ConnectionKey, mode: FtpMode) -> Self
pub fn new(client: FtpClient, key: ConnectionKey, mode: FtpMode) -> Self
Create a new pooled connection wrapper
Sourcepub fn is_healthy(&self, max_idle_time: Duration) -> bool
pub fn is_healthy(&self, max_idle_time: Duration) -> bool
Check if this connection is still healthy
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PooledConnection
impl RefUnwindSafe for PooledConnection
impl Send for PooledConnection
impl Sync for PooledConnection
impl Unpin for PooledConnection
impl UnsafeUnpin for PooledConnection
impl UnwindSafe for PooledConnection
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