pub struct AeronContext { /* private fields */ }Implementations§
Source§impl AeronContext
impl AeronContext
Sourcepub fn new() -> Result<Self, AeronCError>
pub fn new() -> Result<Self, AeronCError>
Create a AeronContext struct and initialize with default values.
§Return
0 for success and -1 for error.
pub fn set_dir(&self, value: &CStr) -> Result<i32, AeronCError>
pub fn get_dir(&self) -> &str
pub fn set_driver_timeout_ms(&self, value: u64) -> Result<i32, AeronCError>
pub fn get_driver_timeout_ms(&self) -> u64
pub fn set_keepalive_interval_ns(&self, value: u64) -> Result<i32, AeronCError>
pub fn get_keepalive_interval_ns(&self) -> u64
pub fn set_resource_linger_duration_ns( &self, value: u64, ) -> Result<i32, AeronCError>
pub fn get_resource_linger_duration_ns(&self) -> u64
pub fn set_idle_sleep_duration_ns(&self, value: u64) -> Result<i32, AeronCError>
pub fn get_idle_sleep_duration_ns(&self) -> u64
pub fn set_idle_strategy_init_args( &self, value: &CStr, ) -> Result<i32, AeronCError>
pub fn get_idle_strategy_init_args(&self) -> &str
pub fn set_idle_strategy(&self, value: &CStr) -> Result<i32, AeronCError>
pub fn get_idle_strategy(&self) -> &str
pub fn set_pre_touch_mapped_memory( &self, value: bool, ) -> Result<i32, AeronCError>
pub fn get_pre_touch_mapped_memory(&self) -> bool
pub fn set_client_name(&self, value: &CStr) -> Result<i32, AeronCError>
pub fn get_client_name(&self) -> &str
Sourcepub fn set_error_handler<AeronErrorHandlerHandlerImpl: AeronErrorHandlerCallback + 'static>(
&self,
handler: Option<AeronErrorHandlerHandlerImpl>,
) -> Result<Option<Handler<AeronErrorHandlerHandlerImpl>>, AeronCError>
pub fn set_error_handler<AeronErrorHandlerHandlerImpl: AeronErrorHandlerCallback + 'static>( &self, handler: Option<AeronErrorHandlerHandlerImpl>, ) -> Result<Option<Handler<AeronErrorHandlerHandlerImpl>>, AeronCError>
The callback is retained by the C client; this resource keeps it alive automatically.
Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.
pub fn get_error_handler(&self) -> aeron_error_handler_t
pub fn get_error_handler_clientd(&self) -> *mut c_void
Sourcepub fn set_publication_error_frame_handler<AeronPublicationErrorFrameHandlerHandlerImpl: AeronPublicationErrorFrameHandlerCallback + 'static>(
&self,
handler: Option<AeronPublicationErrorFrameHandlerHandlerImpl>,
) -> Result<Option<Handler<AeronPublicationErrorFrameHandlerHandlerImpl>>, AeronCError>
pub fn set_publication_error_frame_handler<AeronPublicationErrorFrameHandlerHandlerImpl: AeronPublicationErrorFrameHandlerCallback + 'static>( &self, handler: Option<AeronPublicationErrorFrameHandlerHandlerImpl>, ) -> Result<Option<Handler<AeronPublicationErrorFrameHandlerHandlerImpl>>, AeronCError>
The callback is retained by the C client; this resource keeps it alive automatically.
Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.
pub fn get_publication_error_frame_handler( &self, ) -> aeron_publication_error_frame_handler_t
pub fn get_publication_error_frame_handler_clientd(&self) -> *mut c_void
Sourcepub fn set_on_new_publication<AeronNewPublicationHandlerImpl: AeronNewPublicationCallback + 'static>(
&self,
handler: Option<AeronNewPublicationHandlerImpl>,
) -> Result<Option<Handler<AeronNewPublicationHandlerImpl>>, AeronCError>
pub fn set_on_new_publication<AeronNewPublicationHandlerImpl: AeronNewPublicationCallback + 'static>( &self, handler: Option<AeronNewPublicationHandlerImpl>, ) -> Result<Option<Handler<AeronNewPublicationHandlerImpl>>, AeronCError>
The callback is retained by the C client; this resource keeps it alive automatically.
Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.
pub fn get_on_new_publication(&self) -> aeron_on_new_publication_t
pub fn get_on_new_publication_clientd(&self) -> *mut c_void
Sourcepub fn set_on_new_exclusive_publication<AeronNewPublicationHandlerImpl: AeronNewPublicationCallback + 'static>(
&self,
handler: Option<AeronNewPublicationHandlerImpl>,
) -> Result<Option<Handler<AeronNewPublicationHandlerImpl>>, AeronCError>
pub fn set_on_new_exclusive_publication<AeronNewPublicationHandlerImpl: AeronNewPublicationCallback + 'static>( &self, handler: Option<AeronNewPublicationHandlerImpl>, ) -> Result<Option<Handler<AeronNewPublicationHandlerImpl>>, AeronCError>
The callback is retained by the C client; this resource keeps it alive automatically.
Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.
pub fn get_on_new_exclusive_publication(&self) -> aeron_on_new_publication_t
pub fn get_on_new_exclusive_publication_clientd(&self) -> *mut c_void
Sourcepub fn set_on_new_subscription<AeronNewSubscriptionHandlerImpl: AeronNewSubscriptionCallback + 'static>(
&self,
handler: Option<AeronNewSubscriptionHandlerImpl>,
) -> Result<Option<Handler<AeronNewSubscriptionHandlerImpl>>, AeronCError>
pub fn set_on_new_subscription<AeronNewSubscriptionHandlerImpl: AeronNewSubscriptionCallback + 'static>( &self, handler: Option<AeronNewSubscriptionHandlerImpl>, ) -> Result<Option<Handler<AeronNewSubscriptionHandlerImpl>>, AeronCError>
The callback is retained by the C client; this resource keeps it alive automatically.
Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.
pub fn get_on_new_subscription(&self) -> aeron_on_new_subscription_t
pub fn get_on_new_subscription_clientd(&self) -> *mut c_void
Sourcepub fn set_on_available_counter<AeronAvailableCounterHandlerImpl: AeronAvailableCounterCallback + 'static>(
&self,
handler: Option<AeronAvailableCounterHandlerImpl>,
) -> Result<Option<Handler<AeronAvailableCounterHandlerImpl>>, AeronCError>
pub fn set_on_available_counter<AeronAvailableCounterHandlerImpl: AeronAvailableCounterCallback + 'static>( &self, handler: Option<AeronAvailableCounterHandlerImpl>, ) -> Result<Option<Handler<AeronAvailableCounterHandlerImpl>>, AeronCError>
The callback is retained by the C client; this resource keeps it alive automatically.
Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.
pub fn get_on_available_counter(&self) -> aeron_on_available_counter_t
pub fn get_on_available_counter_clientd(&self) -> *mut c_void
The callback is retained by the C client; this resource keeps it alive automatically.
Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.
Sourcepub fn set_on_close_client<AeronCloseClientHandlerImpl: AeronCloseClientCallback + 'static>(
&self,
handler: Option<AeronCloseClientHandlerImpl>,
) -> Result<Option<Handler<AeronCloseClientHandlerImpl>>, AeronCError>
pub fn set_on_close_client<AeronCloseClientHandlerImpl: AeronCloseClientCallback + 'static>( &self, handler: Option<AeronCloseClientHandlerImpl>, ) -> Result<Option<Handler<AeronCloseClientHandlerImpl>>, AeronCError>
The callback is retained by the C client; this resource keeps it alive automatically.
Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.
pub fn get_on_close_client(&self) -> aeron_on_close_client_t
pub fn get_on_close_client_clientd(&self) -> *mut c_void
Sourcepub fn set_use_conductor_agent_invoker(
&self,
value: bool,
) -> Result<i32, AeronCError>
pub fn set_use_conductor_agent_invoker( &self, value: bool, ) -> Result<i32, AeronCError>
Whether to use an invoker to control the conductor agent or spawn a thread.
pub fn get_use_conductor_agent_invoker(&self) -> bool
Sourcepub fn set_agent_on_start_function<AeronAgentStartFuncHandlerImpl: AeronAgentStartFuncCallback + 'static>(
&self,
value: Option<AeronAgentStartFuncHandlerImpl>,
) -> Result<Option<Handler<AeronAgentStartFuncHandlerImpl>>, AeronCError>
pub fn set_agent_on_start_function<AeronAgentStartFuncHandlerImpl: AeronAgentStartFuncCallback + 'static>( &self, value: Option<AeronAgentStartFuncHandlerImpl>, ) -> Result<Option<Handler<AeronAgentStartFuncHandlerImpl>>, AeronCError>
The callback is retained by the C client; this resource keeps it alive automatically.
Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.
pub fn get_agent_on_start_function(&self) -> aeron_agent_on_start_func_t
pub fn get_agent_on_start_state(&self) -> *mut c_void
Sourcepub fn request_driver_termination(
directory: &CStr,
token_buffer: &[u8],
) -> Result<i32, AeronCError>
pub fn request_driver_termination( directory: &CStr, token_buffer: &[u8], ) -> Result<i32, AeronCError>
pub fn get_inner(&self) -> *mut aeron_context_t
Sourcepub unsafe fn get_inner_mut(&self) -> &mut aeron_context_t
pub unsafe fn get_inner_mut(&self) -> &mut aeron_context_t
Mutable access to the underlying C struct, minted from &self: nothing
prevents two live &mut at once, so the caller must ensure exclusive
access for the lifetime of the returned reference.
§Safety
No other reference (& or &mut) to the underlying struct may be
alive while the returned &mut is in use.
pub fn get_inner_ref(&self) -> &aeron_context_t
Source§impl AeronContext
impl AeronContext
Sourcepub fn set_idle_strategy_kind(
&self,
kind: AeronIdleStrategyKind,
) -> Result<i32, AeronCError>
pub fn set_idle_strategy_kind( &self, kind: AeronIdleStrategyKind, ) -> Result<i32, AeronCError>
Typed variant of Self::set_idle_strategy: configures the conductor’s idle
strategy without stringly-typed names, setting coherent default init args
(override afterwards with Self::set_idle_strategy_init_args if needed).
Trait Implementations§
Source§impl Clone for AeronContext
impl Clone for AeronContext
Source§fn clone(&self) -> AeronContext
fn clone(&self) -> AeronContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more