pub trait TQueueLike<T>: Clone + Send {
    fn read(&self) -> StmResult<T>;
    fn write(&self, value: T) -> StmResult<()>;
    fn is_empty(&self) -> StmResult<bool>;
}
Expand description

Transactional queue-like structure.

This is a common interface between the various implementations in Simon Marlow’s book.

Required Methods

Pop the head of the queue, or retry until there is an element if it’s empty.

Push to the end of the queue.

Check if the queue is empty.

Implementors