commonware_p2p/authenticated/lookup/actors/peer/ingress.rs
1use crate::authenticated::Mailbox;
2use commonware_utils::channels::fallible::AsyncFallibleExt;
3
4/// Messages that can be sent to the peer [super::Actor].
5#[derive(Clone, Debug)]
6pub enum Message {
7 /// Kill the peer actor.
8 Kill,
9}
10
11impl Mailbox<Message> {
12 pub async fn kill(&mut self) {
13 self.0.send_lossy(Message::Kill).await;
14 }
15}