Module borrow

Source
Expand description

“Borrow” sockets

Borrow sockets use a bbq2 queue to store the serialized form of messages.

This allows for sending and receiving borrowed types like &str or &[u8], or messages that contain borrowed types. This is achieved by serializing messages into the bbq2 ring buffer when inserting into the socket, and deserializing when removing from the socket.

Although you can use borrowed sockets for types that are fully owned, e.g. T: 'static, you should prefer the owned socket variants when possible, as they store messages more efficiently and may be able to fully skip a ser/de round trip when sending messages locally.

Structs§

Recv
ResponseGrant
Socket
SocketHdl