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: &str) -> 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 get_idle_sleep_duration_ns(&self) -> u64
pub fn set_idle_sleep_duration_ns(&self, value: u64) -> Result<i32, AeronCError>
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: &str) -> Result<i32, AeronCError>
pub fn get_client_name(&self) -> &str
pub fn set_error_handler<AeronErrorHandlerHandlerImpl: AeronErrorHandlerCallback>( &self, handler: Option<&Handler<AeronErrorHandlerHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn set_error_handler_once<AeronErrorHandlerHandlerImpl: FnMut(c_int, &str)>(
&self,
handler: AeronErrorHandlerHandlerImpl,
) -> Result<i32, AeronCError>
pub fn set_error_handler_once<AeronErrorHandlerHandlerImpl: FnMut(c_int, &str)>( &self, handler: AeronErrorHandlerHandlerImpl, ) -> 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 get_error_handler(&self) -> aeron_error_handler_t
pub fn get_error_handler_clientd(&self) -> *mut c_void
pub fn set_publication_error_frame_handler<AeronPublicationErrorFrameHandlerHandlerImpl: AeronPublicationErrorFrameHandlerCallback>( &self, handler: Option<&Handler<AeronPublicationErrorFrameHandlerHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn set_publication_error_frame_handler_once<AeronPublicationErrorFrameHandlerHandlerImpl: FnMut(AeronPublicationErrorValues)>(
&self,
handler: AeronPublicationErrorFrameHandlerHandlerImpl,
) -> Result<i32, AeronCError>
pub fn set_publication_error_frame_handler_once<AeronPublicationErrorFrameHandlerHandlerImpl: FnMut(AeronPublicationErrorValues)>( &self, handler: AeronPublicationErrorFrameHandlerHandlerImpl, ) -> 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 get_publication_error_frame_handler( &self, ) -> aeron_publication_error_frame_handler_t
pub fn get_publication_error_frame_handler_clientd(&self) -> *mut c_void
pub fn set_on_new_publication<AeronNewPublicationHandlerImpl: AeronNewPublicationCallback>( &self, handler: Option<&Handler<AeronNewPublicationHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn set_on_new_publication_once<AeronNewPublicationHandlerImpl: FnMut(AeronAsyncAddPublication, &str, i32, i32, i64)>(
&self,
handler: AeronNewPublicationHandlerImpl,
) -> Result<i32, AeronCError>
pub fn set_on_new_publication_once<AeronNewPublicationHandlerImpl: FnMut(AeronAsyncAddPublication, &str, i32, i32, i64)>( &self, handler: AeronNewPublicationHandlerImpl, ) -> 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 get_on_new_publication(&self) -> aeron_on_new_publication_t
pub fn get_on_new_publication_clientd(&self) -> *mut c_void
pub fn set_on_new_exclusive_publication<AeronNewPublicationHandlerImpl: AeronNewPublicationCallback>( &self, handler: Option<&Handler<AeronNewPublicationHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn set_on_new_exclusive_publication_once<AeronNewPublicationHandlerImpl: FnMut(AeronAsyncAddPublication, &str, i32, i32, i64)>(
&self,
handler: AeronNewPublicationHandlerImpl,
) -> Result<i32, AeronCError>
pub fn set_on_new_exclusive_publication_once<AeronNewPublicationHandlerImpl: FnMut(AeronAsyncAddPublication, &str, i32, i32, i64)>( &self, handler: AeronNewPublicationHandlerImpl, ) -> 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 get_on_new_exclusive_publication(&self) -> aeron_on_new_publication_t
pub fn get_on_new_exclusive_publication_clientd(&self) -> *mut c_void
pub fn set_on_new_subscription<AeronNewSubscriptionHandlerImpl: AeronNewSubscriptionCallback>( &self, handler: Option<&Handler<AeronNewSubscriptionHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn set_on_new_subscription_once<AeronNewSubscriptionHandlerImpl: FnMut(AeronAsyncAddSubscription, &str, i32, i64)>(
&self,
handler: AeronNewSubscriptionHandlerImpl,
) -> Result<i32, AeronCError>
pub fn set_on_new_subscription_once<AeronNewSubscriptionHandlerImpl: FnMut(AeronAsyncAddSubscription, &str, i32, i64)>( &self, handler: AeronNewSubscriptionHandlerImpl, ) -> 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 get_on_new_subscription(&self) -> aeron_on_new_subscription_t
pub fn get_on_new_subscription_clientd(&self) -> *mut c_void
pub fn set_on_available_counter<AeronAvailableCounterHandlerImpl: AeronAvailableCounterCallback>( &self, handler: Option<&Handler<AeronAvailableCounterHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn set_on_available_counter_once<AeronAvailableCounterHandlerImpl: FnMut(AeronCountersReader, i64, i32)>(
&self,
handler: AeronAvailableCounterHandlerImpl,
) -> Result<i32, AeronCError>
pub fn set_on_available_counter_once<AeronAvailableCounterHandlerImpl: FnMut(AeronCountersReader, i64, i32)>( &self, handler: AeronAvailableCounterHandlerImpl, ) -> 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 get_on_available_counter(&self) -> aeron_on_available_counter_t
pub fn get_on_available_counter_clientd(&self) -> *mut c_void
NOTE: aeron must not store this closure and instead use it immediately. If not you will get undefined behaviour, use with care
pub fn set_on_close_client<AeronCloseClientHandlerImpl: AeronCloseClientCallback>( &self, handler: Option<&Handler<AeronCloseClientHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn set_on_close_client_once<AeronCloseClientHandlerImpl: FnMut()>(
&self,
handler: AeronCloseClientHandlerImpl,
) -> Result<i32, AeronCError>
pub fn set_on_close_client_once<AeronCloseClientHandlerImpl: FnMut()>( &self, handler: AeronCloseClientHandlerImpl, ) -> 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 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
pub fn set_agent_on_start_function<AeronAgentStartFuncHandlerImpl: AeronAgentStartFuncCallback>( &self, value: Option<&Handler<AeronAgentStartFuncHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn set_agent_on_start_function_once<AeronAgentStartFuncHandlerImpl: FnMut(&str)>(
&self,
value: AeronAgentStartFuncHandlerImpl,
) -> Result<i32, AeronCError>
pub fn set_agent_on_start_function_once<AeronAgentStartFuncHandlerImpl: FnMut(&str)>( &self, value: AeronAgentStartFuncHandlerImpl, ) -> 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 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 close(&self) -> Result<i32, AeronCError>
pub fn close(&self) -> Result<i32, AeronCError>
Sourcepub fn request_driver_termination(
directory: &str,
token_buffer: *const u8,
token_length: usize,
) -> Result<i32, AeronCError>
pub fn request_driver_termination( directory: &str, token_buffer: *const u8, token_length: usize, ) -> Result<i32, AeronCError>
pub fn get_inner(&self) -> *mut aeron_context_t
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