diff --git a/tonic/src/codec/decode.rs b/tonic/src/codec/decode.rs index 66bc14e..2c0a2f8 100644 --- a/tonic/src/codec/decode.rs +++ b/tonic/src/codec/decode.rs @@ -136,6 +136,20 @@ impl Streaming { impl Streaming { /// Fetch the next message from this stream. + /// + /// # Return value + /// + /// - `Result::Err(val)` means a gRPC error was sent by the sender instead + /// of a valid response message. Refer to [`Status::code`] and + /// [`Status::message`] to examine possible error causes. + /// + /// - `Result::Ok(None)` means the stream was closed by the sender and no + /// more messages will be delivered. Further attempts to call + /// [`Streaming::message`] will result in the same return value. + /// + /// - `Result::Ok(Some(val))` means the sender streamed a valid response + /// message `val`. + /// /// ```rust /// # use tonic::{Streaming, Status, codec::Decoder}; /// # use std::fmt::Debug;