Struct rusteron_media_driver::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 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 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 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 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 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 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 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 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 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 T)

🔬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<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.