Macro boxed_connect_handler

Source
macro_rules! boxed_connect_handler {
    (|$destination:ident, $options:ident, $authenticator:ident| $(async)? $body:block) => { ... };
    (move |$destination:ident, $options:ident, $authenticator:ident| $(async)? $body:block) => { ... };
}
Expand description

Generates a new ConnectHandler for the provided anonymous function in the form of

use distant_net::boxed_connect_handler;

let _handler = boxed_connect_handler!(|destination, options, authenticator| {
    todo!("Implement handler logic.");
});

let _handler = boxed_connect_handler!(|destination, options, authenticator| async {
    todo!("We support async within as well regardless of the keyword!");
});

let _handler = boxed_connect_handler!(move |destination, options, authenticator| {
    todo!("You can also explicitly mark to move into the closure");
});