diff --git a/src/conn/mod.rs b/src/conn/mod.rs index 9188941..741e7a8 100644 --- a/src/conn/mod.rs +++ b/src/conn/mod.rs @@ -196,6 +196,11 @@ impl Conn { self.inner.id } + /// Returns the disconnected state of the connection. + pub fn is_disconnected(&self) -> bool { + self.inner.disconnected + } + /// Returns the ID generated by a query (usually `INSERT`) on a table with a column having the /// `AUTO_INCREMENT` attribute. Returns `None` if there was no previous query on the connection /// or if the query did not update an AUTO_INCREMENT value.