Struct postgres::Notifications[][src]

pub struct Notifications<'a> { /* fields omitted */ }

Notifications from a PostgreSQL backend.

Implementations

impl<'a> Notifications<'a>[src]

pub fn len(&self) -> usize[src]

Returns the number of already buffered pending notifications.

pub fn is_empty(&self) -> bool[src]

Determines if there are any already buffered pending notifications.

pub fn iter(&mut self) -> Iter<'_>[src]

Returns a nonblocking iterator over notifications.

If there are no already buffered pending notifications, this iterator will poll the connection but will not block waiting on notifications over the network. A return value of None either indicates that there are no pending notifications or that the server has disconnected.

Note

This iterator may start returning Some after previously returning None if more notifications are received.

pub fn blocking_iter(&mut self) -> BlockingIter<'_>[src]

Returns a blocking iterator over notifications.

If there are no already buffered pending notifications, this iterator will block indefinitely waiting on the PostgreSQL backend server to send one. It will only return None if the server has disconnected.

pub fn timeout_iter(&mut self, timeout: Duration) -> TimeoutIter<'_>[src]

Returns an iterator over notifications which blocks a limited amount of time.

If there are no already buffered pending notifications, this iterator will block waiting on the PostgreSQL backend server to send one up to the provided timeout. A return value of None either indicates that there are no pending notifications or that the server has disconnected.

Note

This iterator may start returning Some after previously returning None if more notifications are received.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Notifications<'a>

impl<'a> Send for Notifications<'a>

impl<'a> !Sync for Notifications<'a>

impl<'a> Unpin for Notifications<'a>

impl<'a> !UnwindSafe for Notifications<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,