#[non_exhaustive]pub struct PgNotification {
pub channel: String,
pub payload: String,
pub process_id: i32,
}Expand description
A notification received from PostgreSQL.
§Security
Any role that can connect to the database can send a notification on any
channel: channel and payload are
untrusted input (and process_id only names the
sending backend). Re-read the authoritative row, or verify an HMAC in
the payload, before acting on it; see PgListener.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.channel: StringThe channel the notification was sent on, exactly as given to
NOTIFY / pg_notify (case preserved).
payload: StringThe notification payload (empty when none was given).
process_id: i32Process id of the server backend that sent the notification.
Implementations§
Trait Implementations§
Source§impl Clone for PgNotification
impl Clone for PgNotification
Source§impl Debug for PgNotification
impl Debug for PgNotification
impl Eq for PgNotification
Source§impl PartialEq for PgNotification
impl PartialEq for PgNotification
impl StructuralPartialEq for PgNotification
Auto Trait Implementations§
impl Forget for PgNotification
impl Freeze for PgNotification
impl Move for PgNotification
impl RefUnwindSafe for PgNotification
impl Send for PgNotification
impl Sync for PgNotification
impl Unpin for PgNotification
impl UnsafeUnpin for PgNotification
impl UnwindSafe for PgNotification
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.