pub struct PgNotification {
pub channel: String,
pub payload: Value,
}Expand description
Notification received from PostgreSQL LISTEN
Contains the channel name and JSON payload.
Fields§
§channel: StringChannel name that received the notification
payload: ValueJSON payload
Implementations§
Source§impl PgNotification
impl PgNotification
Sourcepub fn parse_payload<T: for<'de> Deserialize<'de>>(&self) -> Result<T, PgError>
pub fn parse_payload<T: for<'de> Deserialize<'de>>(&self) -> Result<T, PgError>
Trait Implementations§
Source§impl Clone for PgNotification
impl Clone for PgNotification
Source§fn clone(&self) -> PgNotification
fn clone(&self) -> PgNotification
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PgNotification
impl Debug for PgNotification
Source§impl<'de> Deserialize<'de> for PgNotification
impl<'de> Deserialize<'de> for PgNotification
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PgNotification
impl RefUnwindSafe for PgNotification
impl Send for PgNotification
impl Sync for PgNotification
impl Unpin 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