pub struct AeronAsyncExecutor { /* private fields */ }Implementations§
Source§impl AeronAsyncExecutor
impl AeronAsyncExecutor
pub fn new( async_enabled: bool, aeron_epoch_clock: aeron_clock_func_t, clientd: *mut c_void, queue: AeronBlockingLinkedQueue, return_queue: AeronBlockingLinkedQueue, runner: AeronAgentRunner, name_resolver: *mut aeron_name_resolver_t, ) -> Result<Self, AeronCError>
Sourcepub fn new_zeroed_on_heap() -> Self
pub fn new_zeroed_on_heap() -> Self
creates zeroed struct where the underlying c struct is on the heap
Sourcepub fn new_zeroed_on_stack() -> Self
pub fn new_zeroed_on_stack() -> Self
creates zeroed struct where the underlying c struct is on the stack (Use with care)
pub fn async_enabled(&self) -> bool
pub fn aeron_epoch_clock(&self) -> aeron_clock_func_t
pub fn clientd(&self) -> *mut c_void
pub fn queue(&self) -> AeronBlockingLinkedQueue
pub fn return_queue(&self) -> AeronBlockingLinkedQueue
pub fn runner(&self) -> AeronAgentRunner
pub fn name_resolver(&self) -> *mut aeron_name_resolver_t
pub fn init( &self, context: &AeronDriverContext, name_resolver: *mut aeron_name_resolver_t, agent_role_name: &CStr, clientd: *mut c_void, ) -> Result<i32, AeronCError>
pub fn do_work(clientd: *mut c_void) -> Result<i32, AeronCError>
pub fn on_start(state: *mut c_void, role_name: &CStr)
pub fn close(&self) -> Result<i32, AeronCError>
pub fn submit<AeronAsyncExecutorTaskCancelFuncHandlerImpl: AeronAsyncExecutorTaskCancelFuncCallback>( &self, on_execute: aeron_async_executor_task_on_execute_func_t, on_complete: aeron_async_executor_task_on_complete_func_t, on_cancel: Option<&Handler<AeronAsyncExecutorTaskCancelFuncHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn submit_once<AeronAsyncExecutorTaskCancelFuncHandlerImpl: FnMut(*mut c_void)>(
&self,
on_execute: aeron_async_executor_task_on_execute_func_t,
on_complete: aeron_async_executor_task_on_complete_func_t,
on_cancel: AeronAsyncExecutorTaskCancelFuncHandlerImpl,
) -> Result<i32, AeronCError>
pub fn submit_once<AeronAsyncExecutorTaskCancelFuncHandlerImpl: FnMut(*mut c_void)>( &self, on_execute: aeron_async_executor_task_on_execute_func_t, on_complete: aeron_async_executor_task_on_complete_func_t, on_cancel: AeronAsyncExecutorTaskCancelFuncHandlerImpl, ) -> Result<i32, AeronCError>
NOTE: aeron must not store this closure and instead use it immediately. If not you will get undefined behaviour, use with care
pub fn process_completions(&self, limit: c_int) -> Result<i32, AeronCError>
pub fn get_inner(&self) -> *mut aeron_async_executor_t
pub fn get_inner_mut(&self) -> &mut aeron_async_executor_t
pub fn get_inner_ref(&self) -> &aeron_async_executor_t
Source§impl AeronAsyncExecutor
impl AeronAsyncExecutor
Sourcepub fn clone_struct(&self) -> Self
pub fn clone_struct(&self) -> Self
Regular clone just increases the reference count of underlying count.
clone_struct shallow copies the content of the underlying struct on heap.
NOTE: if the struct has references to other structs these will not be copied
Must be only used on structs which has no init/clean up methods. So its dangerous to use with Aeron/AeronContext/AeronPublication/AeronSubscription More intended for AeronArchiveRecordingDescriptor (note strings will not work as its a shallow copy)
Trait Implementations§
Source§impl Clone for AeronAsyncExecutor
impl Clone for AeronAsyncExecutor
Source§fn clone(&self) -> AeronAsyncExecutor
fn clone(&self) -> AeronAsyncExecutor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AeronAsyncExecutor
impl Debug for AeronAsyncExecutor
Source§impl Default for AeronAsyncExecutor
This will create an instance where the struct is zeroed, use with care
impl Default for AeronAsyncExecutor
This will create an instance where the struct is zeroed, use with care