Skip to main content

derive_deftly_template_Handshake

Macro derive_deftly_template_Handshake 

Source
macro_rules! derive_deftly_template_Handshake {
    ({ $($driver:tt)* } [$($aoptions:tt)*] ($($future:tt)*) $($tpassthrough:tt)*) => { ... };
    ($($wrong:tt)*) => { ... };
}
Expand description

Macro-generated components for a handshake outer state structure

§Requirements

  • Must be a struct containing state: State
  • State must be in scope as a binding at the derivation site
  • State must have a unit variant Failed
  • One Option field must be decorated #[deftly(handshake(output))]

§Generates

  • Implementation of HasHandshake
  • Implementation of HasHandshakeState
  • Implementation of HasHandshakeOutput

This is a derive_deftly template. Do not invoke it directly. To use it, write: #[derive(Deftly)] #[derive_deftly(Handshake)].