Skip to main content

SendPacketHandler

Type Alias SendPacketHandler 

Source
pub type SendPacketHandler<'a> = Box<dyn FnMut(&[u8], Message, Direction) + Send + 'a>;
Available on crate feature binary only.
Expand description

The same as PacketHandler but also implements Send.

See Port::set_packet_handler for more details.

Aliased Type§

pub struct SendPacketHandler<'a>(/* private fields */);

Trait Implementations§

Source§

impl<'a, F> From<F> for SendPacketHandler<'a>
where F: FnMut(&[u8], Message, Direction) + Send + 'a,

Source§

fn from(value: F) -> Self

Create an instance of the type from another type T.