From 0c056148d0c484def905b16b539fb845e31541d4 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 1 Jan 2023 20:33:06 -0500 Subject: [PATCH] Clarify poll_message docs Closes #975 --- tokio-postgres/src/connection.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tokio-postgres/src/connection.rs b/tokio-postgres/src/connection.rs index 30be4e834..414335955 100644 --- a/tokio-postgres/src/connection.rs +++ b/tokio-postgres/src/connection.rs @@ -302,6 +302,9 @@ where /// /// The server can send notices as well as notifications asynchronously to the client. Applications that wish to /// examine those messages should use this method to drive the connection rather than its `Future` implementation. + /// + /// Return values of `None` or `Some(Err(_))` are "terminal"; callers should not invoke this method again after + /// receiving one of those values. pub fn poll_message( &mut self, cx: &mut Context<'_>,