ThriftConnection

Trait ThriftConnection 

Source
pub trait ThriftConnection {
    type Error;

    // Required method
    fn is_valid(&mut self) -> Result<(), Self::Error>;

    // Provided method
    fn has_broken(&mut self) -> bool { ... }
}
Expand description

Checks the validity of the connection

Used by ThriftConnectionManager to implement parts of bb8::ManageConnection and/or r2d2::ManageConnection

Required Associated Types§

Required Methods§

Source

fn is_valid(&mut self) -> Result<(), Self::Error>

See r2d2::ManageConnection::is_valid and/or bb8::ManageConnection::is_valid

§Errors

Should return Err if the connection is invalid

Provided Methods§

Implementors§