Crate cupchan

Source
Expand description

Cup Channel Library

Yes cup-chan please swap my cups around uwu

Simple usage example:

use cupchan::cupchan;

let (mut writer, reader) = cupchan(0);
*writer = 1;
writer.flush();
assert_eq!(*reader, 1);

*writer = 2;
writer.flush();
assert_eq!(*reader, 2);

drop(reader);

let reader = writer.new_reader().unwrap(); // Create a new reader

*writer = 3;
writer.flush();
assert_eq!(*reader, 3);

Structs§

CupchanReader
Read from the Cup Channel by dereferencing this obejct
CupchanWriter
Write to the Cup Channel, make sure to call flush() afterwards.

Functions§

cupchan
Create a new Cup Channel