Function linkspace::runtime::cb::try_cb

source ·
pub fn try_cb<A, R, E>(handle_pkt: A) -> impl PktHandlerwhere
    R: Try<Output = (), Residual = E>,
    E: Debug,
    A: for<'a, 'b> FnMut(&'a dyn NetPkt, &'b Linkspace) -> R + 'static,
Expand description

takes any fn(&dyn NetPkt,&Linkspace) -> Try (e.g. Result or Option) and returns impl PktHandler that logs on break