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
Source§fn clone(&self) -> EndpointHandlerFn
fn clone(&self) -> EndpointHandlerFn
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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