mpsc — multiple messages. oneshot — single message.
mpsc:
oneshot:
1use tokio::sync::{mpsc, oneshot};23// mpsc4let (tx, mut rx) = mpsc::channel(32);5tx.send(1).await.unwrap();6tx.send(2).await.unwrap();78// oneshot9let (tx, rx) = oneshot::channel();10tx.send("hello").unwrap();11let val = rx.await.unwrap();
Key: mpsc for streams, oneshot for single value.