[−][src]Attribute Macro milter_callback::on_close
#[on_close]
Generates a callback function of type CloseCallback
that delegates to
the annotated function.
As its sole argument on_close
takes an identifier to be used as the name
of the generated function.
The on_close
callback is called when an SMTP connection is closed. It is
always called at the end of a connection, also when messages were aborted.
It may even be called as the first and only callback (without
on_connect
!), for example when the MTA decides not to go ahead with this
connection. 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_close(close_callback)] fn handle_close(context: Context<MyData>) -> Status { Status::Continue }