pub fn no_cycle(
agent_id: &str,
lead: &str,
lead_of: impl Fn(&str) -> Option<String>,
) -> Result<(), String>Expand description
Refuse lead as agent_id’s lead when following leads from it comes
back to agent_id. Also checked when a spawned worker’s seat is cleared:
its leader becomes its lead again.