Attribute Macro milter_callback::on_abort [−][src]
#[on_abort]
Expand description
Generates a callback function of type AbortCallback
that delegates to
the annotated function.
As its sole argument on_abort
takes an identifier to be used as the name
of the generated function.
The on_abort
callback is called when processing of the current message
is aborted by the MTA. 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_abort(abort_callback)]
fn handle_abort(context: Context<MyData>) -> Status {
Status::Continue
}