explictly expose all method on the Stream (#5214)

This hides the fact that a Stream is composed of a ReceiveStream and a
SendStream. This is an implementation detail and should not be exposed.
This commit is contained in:
Marten Seemann
2025-06-09 17:14:58 +08:00
committed by GitHub
parent 1b07674b19
commit eb08018a5c
4 changed files with 106 additions and 24 deletions

View File

@@ -41,8 +41,8 @@ const (
NoViablePathError = qerr.NoViablePathError
)
// A StreamError is used for Stream.CancelRead and Stream.CancelWrite.
// It is also returned from Stream.Read and Stream.Write if the peer canceled reading or writing.
// A StreamError is used to signal stream cancellations.
// It is returned from the Read and Write methods of the [ReceiveStream], [SendStream] and [Stream].
type StreamError struct {
StreamID StreamID
ErrorCode StreamErrorCode