Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Sep 19, 2024
1 parent fbccdf2 commit 24e0cbd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
22 changes: 12 additions & 10 deletions neqo-http3/src/connection_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ impl Http3Client {
output
}

/// Send an [`PRIORITY_UPDATE`-frame][1] on next `Http3Client::process(None, )` call.
/// Send an [`PRIORITY_UPDATE`-frame][1] on next [`Http3Client::process`] call.
/// Returns if the priority got changed.
///
/// # Errors
Expand Down Expand Up @@ -622,7 +622,7 @@ impl Http3Client {
/// `InvalidStreamId` if the stream does not exist,
/// `AlreadyClosed` if the stream has already been closed.
/// `TransportStreamDoesNotExist` if the transport stream does not exist (this may happen if
/// `process` has not been called when needed, and HTTP3 layer has not picked up the
/// [`Http3Client::process`] has not been called when needed, and HTTP3 layer has not picked up the
/// info that the stream has been closed.) `InvalidInput` if an empty buffer has been
/// supplied.
pub fn send_data(&mut self, stream_id: StreamId, buf: &[u8]) -> Res<usize> {
Expand Down Expand Up @@ -733,9 +733,9 @@ impl Http3Client {
///
/// `InvalidStreamId` if the stream does not exist,
/// `TransportStreamDoesNotExist` if the transport stream does not exist (this may happen if
/// `process` has not been called when needed, and HTTP3 layer has not picked up the
/// info that the stream has been closed.) `InvalidInput` if an empty buffer has been
/// supplied.
/// [`Http3Client::process`] has not been called when needed, and HTTP3
/// layer has not picked up the info that the stream has been closed.)
/// `InvalidInput` if an empty buffer has been supplied.
pub fn webtransport_close_session(
&mut self,
session_id: StreamId,
Expand Down Expand Up @@ -875,7 +875,8 @@ impl Http3Client {
out
}

/// Same as [`Http3Client::process`] but allocating output into new [`Vec`].
/// Same as [`Http3Client::process_into_buffer`] but allocating output into
/// new [`Vec`].
pub fn process(&mut self, dgram: Option<&Datagram>, now: Instant) -> Output {
let mut write_buffer = vec![];
self.process_into_buffer(dgram.map(Into::into), now, &mut write_buffer)
Expand All @@ -888,7 +889,7 @@ impl Http3Client {
/// First, the payload will be handled by the QUIC layer. Afterward, `process_http3` will be
/// called to handle new [`ConnectionEvent`][1]s.
///
/// After this function is called `process` should be called to check whether new
/// After this function is called [`Http3Client::process`] should be called to check whether new
/// packets need to be sent or if a timer needs to be updated.
///
/// [1]: ../neqo_transport/enum.ConnectionEvent.html
Expand All @@ -899,9 +900,10 @@ impl Http3Client {
}

/// Process HTTP3 layer.
/// When `process`, or `process_input` is called we must call this function
/// as well. The functions calls `Http3Client::check_connection_events` to handle events from
/// the QUC layer and calls `Http3Connection::process_sending` to ensure that HTTP/3 layer
/// When [`Http3Client::process`], or [`Http3Client::process_input`] is
/// called we must call this function
/// as well. The functions calls [`Http3Client::check_connection_events`] to handle events from
/// the QUC layer and calls [`Http3Connection::process_sending`] to ensure that HTTP/3 layer
/// data, e.g. control frames, are sent.
fn process_http3(&mut self, now: Instant) {
qtrace!([self], "Process http3 internal.");
Expand Down
3 changes: 2 additions & 1 deletion neqo-http3/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ impl Http3Server {
out
}

/// Same as [`Http3Server::process`] but allocating output into new [`Vec`].
/// Same as [`Http3Server::process_into_buffer`] but allocating output into
/// new [`Vec`].
pub fn process(&mut self, dgram: Option<&Datagram>, now: Instant) -> Output {
let mut write_buffer = vec![];
self.process_into_buffer(dgram.map(Into::into), now, &mut write_buffer)
Expand Down
3 changes: 2 additions & 1 deletion neqo-transport/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,8 @@ impl Connection {
}
}

/// Same as [`Connection::process`] but allocating output into new [`Vec`].
/// Same as [`Connection::process_into_buffer`] but allocating output into
/// new [`Vec`].
#[must_use = "Output of the process function must be handled"]
pub fn process(&mut self, dgram: Option<&Datagram>, now: Instant) -> Output {
let mut write_buffer = vec![];
Expand Down
3 changes: 2 additions & 1 deletion neqo-transport/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ impl Server {
callback.map_or(Output::None, Output::Callback)
}

/// Same as [`Server::process`] but allocating output into new [`Vec`].
/// Same as [`Server::process_into_buffer`] but allocating output into new
/// [`Vec`].
#[must_use]
pub fn process(&mut self, dgram: Option<&Datagram>, now: Instant) -> Output {
let mut write_buffer = vec![];
Expand Down

0 comments on commit 24e0cbd

Please sign in to comment.