pub struct AeronAgentRunner { /* private fields */ }
Implementations§
Source§impl AeronAgentRunner
impl AeronAgentRunner
pub fn new( role_name: &CStr, agent_state: *mut c_void, idle_strategy_state: *mut c_void, on_start_state: *mut c_void, on_start: aeron_agent_on_start_func_t, do_work: aeron_agent_do_work_func_t, on_close: aeron_agent_on_close_func_t, idle_strategy: aeron_idle_strategy_func_t, thread: aeron_thread_t, running: bool, state: u8, ) -> 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 role_name(&self) -> &str
pub fn agent_state(&self) -> *mut c_void
pub fn idle_strategy_state(&self) -> *mut c_void
pub fn on_start_state(&self) -> *mut c_void
pub fn on_start(&self) -> aeron_agent_on_start_func_t
pub fn do_work(&self) -> aeron_agent_do_work_func_t
pub fn on_close(&self) -> aeron_agent_on_close_func_t
pub fn idle_strategy(&self) -> aeron_idle_strategy_func_t
pub fn thread(&self) -> aeron_thread_t
pub fn running(&self) -> bool
pub fn state(&self) -> u8
pub fn aeron_agent_init<AeronAgentStartFuncHandlerImpl: AeronAgentStartFuncCallback, AeronIdleStrategyFuncHandlerImpl: AeronIdleStrategyFuncCallback>( &self, role_name: &CStr, state: *mut c_void, on_start: Option<&Handler<AeronAgentStartFuncHandlerImpl>>, do_work: aeron_agent_do_work_func_t, on_close: aeron_agent_on_close_func_t, idle_strategy_func: Option<&Handler<AeronIdleStrategyFuncHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn aeron_agent_init_once<AeronAgentStartFuncHandlerImpl: FnMut(&str), AeronIdleStrategyFuncHandlerImpl: FnMut(c_int)>(
&self,
role_name: &CStr,
state: *mut c_void,
on_start: AeronAgentStartFuncHandlerImpl,
do_work: aeron_agent_do_work_func_t,
on_close: aeron_agent_on_close_func_t,
idle_strategy_func: AeronIdleStrategyFuncHandlerImpl,
) -> Result<i32, AeronCError>
pub fn aeron_agent_init_once<AeronAgentStartFuncHandlerImpl: FnMut(&str), AeronIdleStrategyFuncHandlerImpl: FnMut(c_int)>( &self, role_name: &CStr, state: *mut c_void, on_start: AeronAgentStartFuncHandlerImpl, do_work: aeron_agent_do_work_func_t, on_close: aeron_agent_on_close_func_t, idle_strategy_func: AeronIdleStrategyFuncHandlerImpl, ) -> 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 aeron_agent_start(&self) -> Result<i32, AeronCError>
pub fn aeron_agent_stop(&self) -> Result<i32, AeronCError>
pub fn aeron_agent_close(&self) -> Result<i32, AeronCError>
pub fn get_inner(&self) -> *mut aeron_agent_runner_t
pub fn get_inner_mut(&self) -> &mut aeron_agent_runner_t
pub fn get_inner_ref(&self) -> &aeron_agent_runner_t
Source§impl AeronAgentRunner
impl AeronAgentRunner
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 danagerous to use with Aeron/AeronContext/AeronPublication/AeronSubscription More intended for AeronArchiveRecordingDescriptor
Trait Implementations§
Source§impl Clone for AeronAgentRunner
impl Clone for AeronAgentRunner
Source§fn clone(&self) -> AeronAgentRunner
fn clone(&self) -> AeronAgentRunner
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AeronAgentRunner
impl Debug for AeronAgentRunner
Source§impl Default for AeronAgentRunner
This will create an instance where the struct is zeroed, use with care
impl Default for AeronAgentRunner
This will create an instance where the struct is zeroed, use with care