match_message

Macro match_message 

Source
macro_rules! match_message {
    ($msg:ident { $( $msg_tt:tt )* }) => { ... };
    (@arm $msg:ident as $msg_ty:ty => $msg_handler:block $(,)?) => { ... };
    (@arm $msg:ident as $msg_ty:ty => $msg_handler:expr $(,)?) => { ... };
    (@arm $msg:ident as $msg_ty:ty => $msg_handler:block, $( $msg_tt:tt )*) => { ... };
    (@arm $msg:ident as $msg_ty:ty => $msg_handler:expr, $( $msg_tt:tt )*) => { ... };
}
Expand description

Downcasts Arc<dyn Message> to the one of the given types and runs the code which corresponds to it.