Skip to main content

AeronBlockHandlerCallback

Trait AeronBlockHandlerCallback 

Source
pub trait AeronBlockHandlerCallback {
    // Required method
    fn handle_aeron_block_handler(
        &mut self,
        buffer: &[u8],
        session_id: i32,
        term_id: i32,
    );
}
Expand description

Callback for handling a block of messages being read from a log.

@param clientd passed to the block poll function. @param buffer containing the block of message fragments. @param offset at which the block begins, including any frame headers. @param length of the block in bytes, including any frame headers that is aligned. @param session_id of the stream containing this block of message fragments. @param term_id of the stream containing this block of message fragments.

(note wrapper arguments are borrowed for the call only; copy out any fields, including strings, you use afterwards)

Required Methods§

Source

fn handle_aeron_block_handler( &mut self, buffer: &[u8], session_id: i32, term_id: i32, )

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl AeronBlockHandlerCallback for AeronBlockHandlerLogger

Source§

impl AeronBlockHandlerCallback for AeronBlockHandlerSlot

Source§

impl AeronBlockHandlerCallback for NoHandler

Source§

impl<F: FnMut(&[u8], i32, i32)> AeronBlockHandlerCallback 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: AeronBlockHandlerCallback> AeronBlockHandlerCallback for Handler<T>

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