Skip to main content

Module memory

Module memory 

Source
Expand description

Portable in-memory streams for local connections, emulators and tests.

These streams synchronize through the clock’s locks, with no sockets or worker threads. Split an endpoint with Duplex::into_halves for plain I/O.

Structs§

Reader
Receiving half of a Duplex, with an independently configured read deadline.
Writer
Sending half of a Duplex, sharing one deadline across writes and flushes.

Functions§

duplex
Creates two connected streams with capacity bytes of buffering per direction. Both measure their deadlines on clock, and so does any transport on them.

Type Aliases§

Duplex
One endpoint of an in-memory duplex connection, ready for a client or server.