Skip to main content

guinea_core/actor/
flow.rs

1/// Declares which messages a handler may send. Optional: an actor that
2/// declares no graph gets [`Open`], which allows everything.
3#[diagnostic::on_unimplemented(
4    message = "handler `{M}` does not declare sending `{Out}`",
5    label = "not declared",
6    note = "add the edge in `actor! {{ handlers {{ {M} => {{ send {Out} }} }} }}`"
7)]
8pub trait Allows<M, Out> {}
9
10/// The default: no graph declared, nothing restricted.
11pub struct Open;
12
13impl<M, Out> Allows<M, Out> for Open {}