libpq 6.0.1

Safe binding for libpq
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
 * [Asynchronous Notification](https://www.postgresql.org/docs/current/libpq-notify.html)
 */
impl Connection {
    /**
     * Returns the next notification from a list of unhandled notification messages received from
     * the server.
     */
    pub fn notifies(&self) -> Option<crate::connection::Notify> {
        let raw = unsafe { pq_sys::PQnotifies(self.into()) };

        if raw.is_null() {
            None
        } else {
            Some(raw.into())
        }
    }
}