Support notifications on tokio-postgres

Closes #242
This commit is contained in:
Steven Fackler
2017-03-02 22:27:12 -08:00
committed by Steven Fackler
parent 5685dded4e
commit 9126ec4ef2
4 changed files with 128 additions and 43 deletions

View File

@@ -19,3 +19,14 @@ pub struct CancelData {
/// The secret key for the session.
pub secret_key: i32,
}
/// An asynchronous notification.
#[derive(Clone, Debug)]
pub struct Notification {
/// The process ID of the notifying backend process.
pub process_id: i32,
/// The name of the channel that the notify has been raised on.
pub channel: String,
/// The "payload" string passed from the notifying process.
pub payload: String,
}