Skip to main content

Module spsc

Module spsc 

Source
Expand description

A bounded mailbox for one producer and one consumer.

The mailbox uses only safe Rust atomic operations. Its storage does not allocate after construction. The built-in player-control codec also does not allocate. A full mailbox rejects the incoming value and keeps all accepted values in order.

Structs§

SpscConsumer
The only consumer endpoint for a mailbox.
SpscCounters
Counters can wrap after usize::MAX operations.
SpscProducer
The only producer endpoint for a mailbox.
TimedPlayerControlCodec

Enums§

SpscCommitError
SpscCommitOutcome
SpscCreateError
SpscPopError
SpscPushError
A rejected push returns ownership of the incoming value.

Constants§

TIMED_PLAYER_CONTROL_BYTES

Traits§

SpscCodec
Converts one value to and from a fixed-size atomic payload.

Functions§

spsc_mailbox
Creates one bounded mailbox and its two unique endpoints.
timed_player_control_mailbox

Type Aliases§

SpscEndpoints
TimedPlayerControlConsumer
TimedPlayerControlProducer