Struct age_core::plugin::Connection [−][src]
This is supported on crate feature
plugin only.Expand description
A connection to a plugin binary.
Implementations
pub fn unidir_send<P: FnOnce(UnidirSend<'_, R, W>) -> Result<()>>(
&mut self,
phase_steps: P
) -> Result<()>
pub fn unidir_send<P: FnOnce(UnidirSend<'_, R, W>) -> Result<()>>(
&mut self,
phase_steps: P
) -> Result<()>
Runs a unidirectional phase as the controller.
pub fn unidir_receive<A, B, C, E, F, G, H>(
&mut self,
command_a: (&str, F),
command_b: (&str, G),
command_c: (Option<&str>, H)
) -> Result<(Result<Vec<A>, Vec<E>>, Result<Vec<B>, Vec<E>>, Option<Result<Vec<C>, Vec<E>>>)> where
F: Fn(Stanza) -> Result<A, E>,
G: Fn(Stanza) -> Result<B, E>,
H: Fn(Stanza) -> Result<C, E>,
pub fn unidir_receive<A, B, C, E, F, G, H>(
&mut self,
command_a: (&str, F),
command_b: (&str, G),
command_c: (Option<&str>, H)
) -> Result<(Result<Vec<A>, Vec<E>>, Result<Vec<B>, Vec<E>>, Option<Result<Vec<C>, Vec<E>>>)> where
F: Fn(Stanza) -> Result<A, E>,
G: Fn(Stanza) -> Result<B, E>,
H: Fn(Stanza) -> Result<C, E>,
Runs a unidirectional phase as the recipient.
Arguments
command_a, command_b, and (optionally) command_c are the known commands that
are expected to be received. All other received commands (including grease) will
be ignored.
Runs a bidirectional phase as the controller.
