pub enum EndpointHandlerFn {
Packet(Arc<dyn Fn(&Packet) -> TelemetryResult<()> + Send + Sync + 'static>),
Packed(Arc<dyn Fn(&[u8]) -> TelemetryResult<()> + Send + Sync + 'static>),
}Expand description
Endpoint handler function enum.
Holds either a Packet handler or a packed byte-slice handler.
/// - Packet handler signature: Fn(&Packet) -> TelemetryResult<()>
/// - Packed handler signature: Fn(&[u8]) -> TelemetryResult<()>
Variants§
Packet(Arc<dyn Fn(&Packet) -> TelemetryResult<()> + Send + Sync + 'static>)
Packed(Arc<dyn Fn(&[u8]) -> TelemetryResult<()> + Send + Sync + 'static>)
Trait Implementations§
Source§impl Clone for EndpointHandlerFn
impl Clone for EndpointHandlerFn
Auto Trait Implementations§
impl !RefUnwindSafe for EndpointHandlerFn
impl !UnwindSafe for EndpointHandlerFn
impl Freeze for EndpointHandlerFn
impl Send for EndpointHandlerFn
impl Sync for EndpointHandlerFn
impl Unpin for EndpointHandlerFn
impl UnsafeUnpin for EndpointHandlerFn
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more