pub struct ControlledFragmentAssembler<T> { /* private fields */ }Expand description
A controlled fragment assembler that owns its callback.
Use this when the callback needs to return CONTINUE, ABORT, BREAK, or
COMMIT. Like FragmentAssembler, it can borrow local state, requires an
exclusive borrow while polling, and has no lock or reference count on the
polling path. Its reassembly buffers grow for larger messages. Use
Self::handler_mut to change callback state between polls
Implementations§
Source§impl<T: AeronControlledFragmentHandlerCallback> ControlledFragmentAssembler<T>
impl<T: AeronControlledFragmentHandlerCallback> ControlledFragmentAssembler<T>
pub fn new(handler: T) -> Result<Self, AeronCError>
Sourcepub fn handler_mut(&mut self) -> &mut T
pub fn handler_mut(&mut self) -> &mut T
Change callback state between polls.
Sourcepub fn poll<S: ResourceStorage<aeron_subscription_t>>(
&mut self,
source: &AeronSubscription<S>,
fragment_limit: usize,
) -> Result<i32, AeronCError>
pub fn poll<S: ResourceStorage<aeron_subscription_t>>( &mut self, source: &AeronSubscription<S>, fragment_limit: usize, ) -> Result<i32, AeronCError>
Poll and call the handler with complete messages.
Source§impl<T> ControlledFragmentAssembler<T>
impl<T> ControlledFragmentAssembler<T>
Sourcepub fn delete_session_buffer(&mut self, session_id: i32) -> bool
pub fn delete_session_buffer(&mut self, session_id: i32) -> bool
Release the partial message buffer for a session, if one exists.
Trait Implementations§
Source§impl<T: AeronControlledFragmentHandlerCallback> AeronControlledFragmentHandlerCallback for ControlledFragmentAssembler<T>
impl<T: AeronControlledFragmentHandlerCallback> AeronControlledFragmentHandlerCallback for ControlledFragmentAssembler<T>
fn handle_aeron_controlled_fragment_handler( &mut self, buffer: &[u8], header: &AeronHeader, ) -> aeron_controlled_fragment_handler_action_t
Source§impl<T> Drop for ControlledFragmentAssembler<T>
impl<T> Drop for ControlledFragmentAssembler<T>
Auto Trait Implementations§
impl<T> !Send for ControlledFragmentAssembler<T>
impl<T> !Sync for ControlledFragmentAssembler<T>
impl<T> Freeze for ControlledFragmentAssembler<T>
impl<T> RefUnwindSafe for ControlledFragmentAssembler<T>where
T: RefUnwindSafe,
impl<T> Unpin for ControlledFragmentAssembler<T>
impl<T> UnsafeUnpin for ControlledFragmentAssembler<T>
impl<T> UnwindSafe for ControlledFragmentAssembler<T>where
T: UnwindSafe,
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