Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`trial`.`_dist`.`stream``

module documentation
(source)

Buffer byte streams.

Class | `StreamOpen` | Open a new stream.
Class | `StreamReceiver` | Buffering de-multiplexing byte stream receiver.
Class | `StreamWrite` | Write a chunk of data to a stream.
Function | `chunk` | Break a byte string into pieces of no more than ``chunkSize`` length.
Async Function | `stream` | Send the given stream chunks, one by one, over the given connection.
Type Variable | `T` | Undocumented

def chunk(data: `bytes`, chunkSize: `int`) -> `Iterator[bytes]`: (source)

Break a byte string into pieces of no more than ``chunkSize`` length.

Parameters
data:`bytes` | The byte string.
chunkSize:`int` | The maximum length of the resulting pieces. All pieces except possibly the last will be this length.
Returns
`Iterator[bytes]` | The pieces.

async def stream(amp: `AMP`, chunks: `Iterator[bytes]`) -> `int`: (source)

Send the given stream chunks, one by one, over the given connection.

The chunks are sent using `StreamWrite` over a stream opened using `StreamOpen`.

Returns
`int` | The identifier of the stream over which the chunks were sent.

T = (source)

Undocumented

Value

    TypeVar('T')