Clarify the Response::Nil documentation

This commit is contained in:
teor 2021-02-11 14:53:08 +10:00 committed by Deirdre Connolly
parent af11cc4815
commit e7176b86da
1 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,11 @@ use std::sync::Arc;
/// A response to a network request, represented in internal format.
#[derive(Clone, Debug)]
pub enum Response {
/// A response with no data.
/// Do not send any response to this request.
///
/// Either:
/// * the request does not need a response, or
/// * we have no useful data to provide in response to the request.
Nil,
/// A list of peers, used to respond to `GetPeers`.