rusteron_client

Struct AeronContext

Source
pub struct AeronContext { /* private fields */ }

Implementations§

Source§

impl AeronContext

Source

pub fn new() -> Result<Self, AeronCError>

Create a AeronContext struct and initialize with default values.

§Return

0 for success and -1 for error.

Source

pub fn set_dir(&self, value: &str) -> Result<i32, AeronCError>

Source

pub fn get_dir(&self) -> &str

Source

pub fn set_driver_timeout_ms(&self, value: u64) -> Result<i32, AeronCError>

Source

pub fn get_driver_timeout_ms(&self) -> u64

Source

pub fn set_keepalive_interval_ns(&self, value: u64) -> Result<i32, AeronCError>

Source

pub fn get_keepalive_interval_ns(&self) -> u64

Source

pub fn set_resource_linger_duration_ns( &self, value: u64, ) -> Result<i32, AeronCError>

Source

pub fn get_resource_linger_duration_ns(&self) -> u64

Source

pub fn get_idle_sleep_duration_ns(&self) -> u64

Source

pub fn set_idle_sleep_duration_ns(&self, value: u64) -> Result<i32, AeronCError>

Source

pub fn set_pre_touch_mapped_memory( &self, value: bool, ) -> Result<i32, AeronCError>

Source

pub fn get_pre_touch_mapped_memory(&self) -> bool

Source

pub fn set_client_name(&self, value: &str) -> Result<i32, AeronCError>

Source

pub fn get_client_name(&self) -> &str

Source

pub fn set_error_handler<AeronErrorHandlerHandlerImpl: AeronErrorHandlerCallback>( &self, handler: Option<&Handler<AeronErrorHandlerHandlerImpl>>, ) -> Result<i32, AeronCError>

Source

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

Source

pub fn get_error_handler(&self) -> aeron_error_handler_t

Source

pub fn get_error_handler_clientd(&self) -> *mut c_void

Source

pub fn set_publication_error_frame_handler<AeronPublicationErrorFrameHandlerHandlerImpl: AeronPublicationErrorFrameHandlerCallback>( &self, handler: Option<&Handler<AeronPublicationErrorFrameHandlerHandlerImpl>>, ) -> Result<i32, AeronCError>

Source

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

Source

pub fn get_publication_error_frame_handler( &self, ) -> aeron_publication_error_frame_handler_t

Source

pub fn get_publication_error_frame_handler_clientd(&self) -> *mut c_void

Source

pub fn set_on_new_publication<AeronNewPublicationHandlerImpl: AeronNewPublicationCallback>( &self, handler: Option<&Handler<AeronNewPublicationHandlerImpl>>, ) -> Result<i32, AeronCError>

Source

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

Source

pub fn get_on_new_publication(&self) -> aeron_on_new_publication_t

Source

pub fn get_on_new_publication_clientd(&self) -> *mut c_void

Source

pub fn set_on_new_exclusive_publication<AeronNewPublicationHandlerImpl: AeronNewPublicationCallback>( &self, handler: Option<&Handler<AeronNewPublicationHandlerImpl>>, ) -> Result<i32, AeronCError>

Source

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

Source

pub fn get_on_new_exclusive_publication(&self) -> aeron_on_new_publication_t

Source

pub fn get_on_new_exclusive_publication_clientd(&self) -> *mut c_void

Source

pub fn set_on_new_subscription<AeronNewSubscriptionHandlerImpl: AeronNewSubscriptionCallback>( &self, handler: Option<&Handler<AeronNewSubscriptionHandlerImpl>>, ) -> Result<i32, AeronCError>

Source

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

Source

pub fn get_on_new_subscription(&self) -> aeron_on_new_subscription_t

Source

pub fn get_on_new_subscription_clientd(&self) -> *mut c_void

Source

pub fn set_on_available_counter<AeronAvailableCounterHandlerImpl: AeronAvailableCounterCallback>( &self, handler: Option<&Handler<AeronAvailableCounterHandlerImpl>>, ) -> Result<i32, AeronCError>

Source

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

Source

pub fn get_on_available_counter(&self) -> aeron_on_available_counter_t

Source

pub fn get_on_available_counter_clientd(&self) -> *mut c_void

Source

pub fn set_on_unavailable_counter<AeronUnavailableCounterHandlerImpl: AeronUnavailableCounterCallback>( &self, handler: Option<&Handler<AeronUnavailableCounterHandlerImpl>>, ) -> Result<i32, AeronCError>

Source

pub fn set_on_unavailable_counter_once<AeronUnavailableCounterHandlerImpl: FnMut(AeronCountersReader, i64, i32)>( &self, handler: AeronUnavailableCounterHandlerImpl, ) -> 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

Source

pub fn get_on_unavailable_counter(&self) -> aeron_on_unavailable_counter_t

Source

pub fn get_on_unavailable_counter_clientd(&self) -> *mut c_void

Source

pub fn set_on_close_client<AeronCloseClientHandlerImpl: AeronCloseClientCallback>( &self, handler: Option<&Handler<AeronCloseClientHandlerImpl>>, ) -> Result<i32, AeronCError>

Source

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

Source

pub fn get_on_close_client(&self) -> aeron_on_close_client_t

Source

pub fn get_on_close_client_clientd(&self) -> *mut c_void

Source

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.

Source

pub fn get_use_conductor_agent_invoker(&self) -> bool

Source

pub fn set_agent_on_start_function<AeronAgentStartFuncHandlerImpl: AeronAgentStartFuncCallback>( &self, value: Option<&Handler<AeronAgentStartFuncHandlerImpl>>, ) -> Result<i32, AeronCError>

Source

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

Source

pub fn get_agent_on_start_function(&self) -> aeron_agent_on_start_func_t

Source

pub fn get_agent_on_start_state(&self) -> *mut c_void

Source

pub fn close(&self) -> Result<i32, AeronCError>

Close and delete AeronContext struct.

§Return

0 for success and -1 for error.

Source

pub fn request_driver_termination( directory: &str, token_buffer: *const u8, token_length: usize, ) -> Result<i32, AeronCError>

Request the media driver terminates operation and closes all resources.

§Parameters
  • directory in which the media driver is running.

  • token_buffer containing the authentication token confirming the client is allowed to terminate the driver.

  • token_length of the token in the buffer.

§Return
Source

pub fn get_inner(&self) -> *mut aeron_context_t

Trait Implementations§

Source§

impl Clone for AeronContext

Source§

fn clone(&self) -> AeronContext

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AeronContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for AeronContext

Source§

type Target = aeron_context_stct

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl From<&AeronContext> for *mut aeron_context_t

Source§

fn from(value: &AeronContext) -> Self

Converts to this type from the input type.
Source§

impl From<*const aeron_context_stct> for AeronContext

Source§

fn from(value: *const aeron_context_t) -> Self

Converts to this type from the input type.
Source§

impl From<*mut aeron_context_stct> for AeronContext

Source§

fn from(value: *mut aeron_context_t) -> Self

Converts to this type from the input type.
Source§

impl From<AeronContext> for *mut aeron_context_t

Source§

fn from(value: AeronContext) -> Self

Converts to this type from the input type.
Source§

impl From<AeronContext> for aeron_context_t

Source§

fn from(value: AeronContext) -> Self

Converts to this type from the input type.
Source§

impl From<aeron_context_stct> for AeronContext

Source§

fn from(value: aeron_context_t) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.