use super::{Channel, Failure};
use crate::rendezvous::say::{self, Kind, Say};
use crate::run::Notice;
impl Channel {
pub(crate) fn speak_to(&mut self, notice: &Notice) {
if let Some(roving) = self.roving.as_mut() {
roving.say = Say::to(notice);
}
}
pub(super) fn say(&mut self, kind: Kind, line: String) {
if let Some(roving) = self.roving.as_mut() {
roving.say.say(kind, line);
}
}
pub(super) fn lost(&mut self, leg: &str, e: &std::io::Error, punched: bool) -> Failure {
if punched {
self.say(Kind::Held, say::held_dropped(leg, e));
}
Failure::Wire(self.failed(leg, e))
}
}