Skip to main content

AeronFragmentHandlerCallback

Trait AeronFragmentHandlerCallback 

Source
pub trait AeronFragmentHandlerCallback {
    // Required method
    fn handle_aeron_fragment_handler(
        &mut self,
        buffer: &[u8],
        header: AeronHeader,
    );
}
Expand description

Callback for handling fragments of data being read from a log.

The frame will either contain a whole message or a fragment of a message to be reassembled. Messages are fragmented if greater than the frame for MTU in length.

@param clientd passed to the poll function. @param buffer containing the data. @param length of the data in bytes. @param header representing the meta data for the data.

(note you must copy any arguments that you use afterwards even those with static lifetimes)

Required Methods§

Source

fn handle_aeron_fragment_handler(&mut self, buffer: &[u8], header: AeronHeader)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl AeronFragmentHandlerCallback for AeronFragmentAssembler

Source§

impl AeronFragmentHandlerCallback for AeronFragmentHandlerLogger

Source§

impl AeronFragmentHandlerCallback for FnMutMessageHandler

Source§

impl AeronFragmentHandlerCallback for NoHandler

Source§

impl<F: FnMut(&[u8], AeronHeader)> AeronFragmentHandlerCallback for F

Any closure with the matching signature is a callback: methods that retain it heap-allocate it into a Handler owned by the registering resource.

Source§

impl<T: AeronFragmentHandlerCallback> AeronFragmentHandlerCallback for Handler<T>

Pass an existing Handler clone anywhere a callback value is expected, e.g. to share one callback instance across several registrations.