Attribute Macro milter_callback::on_eoh[][src]

#[on_eoh]
Expand description

Generates a callback function of type EohCallback that delegates to the annotated function.

As its sole argument on_eoh takes an identifier to be used as the name of the generated function.

The on_eoh callback is called when the end of the message header is reached. The signature of the annotated function must be as specified below.

Arguments:

  • Context<T> – the callback context

Return type:

  • Status – the response status

Examples

use milter::{Context, Status};

#[on_eoh(eoh_callback)]
fn handle_eoh(context: Context<MyData>) -> Status {
    Status::Continue
}