pub struct AeronImageFragmentAssembler<T> { /* private fields */ }Expand description
A fragment assembler for a single image, such as one from
AeronSubscription::image_at_index, that owns its callback.
Unlike FragmentAssembler, it keeps one buffer, allocated in Self::new,
and needs no session lookup. The buffer grows for larger messages. Feed it
fragments from one session only
Implementations§
Source§impl<T: AeronFragmentHandlerCallback> AeronImageFragmentAssembler<T>
impl<T: AeronFragmentHandlerCallback> AeronImageFragmentAssembler<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_image_t>>(
&mut self,
source: &AeronImage<S>,
fragment_limit: usize,
) -> Result<i32, AeronCError>
pub fn poll<S: ResourceStorage<aeron_image_t>>( &mut self, source: &AeronImage<S>, fragment_limit: usize, ) -> Result<i32, AeronCError>
Poll and call the handler with complete messages.
Trait Implementations§
Source§impl<T: AeronFragmentHandlerCallback> AeronFragmentHandlerCallback for AeronImageFragmentAssembler<T>
impl<T: AeronFragmentHandlerCallback> AeronFragmentHandlerCallback for AeronImageFragmentAssembler<T>
fn handle_aeron_fragment_handler(&mut self, buffer: &[u8], header: &AeronHeader)
Source§impl<T> Drop for AeronImageFragmentAssembler<T>
impl<T> Drop for AeronImageFragmentAssembler<T>
Auto Trait Implementations§
impl<T> !Send for AeronImageFragmentAssembler<T>
impl<T> !Sync for AeronImageFragmentAssembler<T>
impl<T> Freeze for AeronImageFragmentAssembler<T>
impl<T> RefUnwindSafe for AeronImageFragmentAssembler<T>where
T: RefUnwindSafe,
impl<T> Unpin for AeronImageFragmentAssembler<T>
impl<T> UnsafeUnpin for AeronImageFragmentAssembler<T>
impl<T> UnwindSafe for AeronImageFragmentAssembler<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