Struct postgres::Notifications [−][src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,