Struct postgres::notification::Notifications [] [src]

pub struct Notifications<'conn> {
    // some fields omitted
}

Notifications from the Postgres backend.

Methods

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

fn len(&self) -> usize

Returns the number of pending notifications.

fn iter<'a>(&'a self) -> Iter<'a>

Returns an iterator over pending notifications.

Note

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

fn blocking_iter<'a>(&'a self) -> BlockingIter<'a>

Returns an iterator over notifications that blocks until one is received if none are pending.

The iterator will never return None.

fn timeout_iter<'a>(&'a self, timeout: Duration) -> TimeoutIter<'a>

Returns an iterator over notifications that blocks for a limited time waiting to receive one if none are pending.

Note

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

Trait Implementations

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

fn fmt(&self, fmt: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<'a, 'conn> IntoIterator for &'a Notifications<'conn>
[src]

type Item = Result<Notification>

The type of the elements being iterated over.

type IntoIter = Iter<'a>

Which kind of iterator are we turning this into?

fn into_iter(self) -> Iter<'a>

Creates an iterator from a value. Read more