1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! The names you write: `use psicose::prelude::*;`
//!
//! **Only PSICOSE types** — this crate has zero dependencies.
//! Full catalog: `docs/API.md` / `docs/API.pt-BR.md`.
//!
//! ## Included here
//!
//! | Group | Names |
//! | --- | --- |
//! | Motor | [`Node`], [`Wire`], [`LinkFace`], [`Turn`], [`WindowTurn`], [`PageLink`], [`establish`], [`send_message`] |
//! | P2P | [`PeerId`], [`PeerLink`], [`PeerTable`], [`PeerSession`], … |
//! | Session | [`SessionConfig`], [`SessionState`], [`Capabilities`] |
//! | Messages | [`Fragmenter`], [`Defragmenter`], [`MessageId`], [`StreamId`], … |
//! | Transport | [`Pump`], [`WindowedPump`], [`ByteTransport`], [`Sender`], … |
//! | Bytes | [`SliceSource`], [`SliceSink`], [`Frame`], [`IdleBudget`], … |
//! | Errors | [`Error`], [`WireCopyError`], [`TableError`], [`LinkEvent`], … |
//!
//! ```
//! use psicose::prelude::*;
//!
//! let wire = Wire::new();
//! let (pump_a, pump_b) = wire.link_pumps();
//!
//! let mut alice = Node::<4>::new(PeerId::from_label(b"alice"));
//! let mut bob = Node::<4>::new(PeerId::from_label(b"bob"));
//!
//! let mut a = match alice.connect(pump_a) {
//! Ok(link) => link,
//! Err(_) => return,
//! };
//! let mut b = bob.accept(pump_b);
//! assert!(establish(&mut a, &mut alice, &mut b, &mut bob));
//! ```
pub use crate::;