rusteron_media_driver

Struct AeronDriver

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

Implementations§

Source§

impl AeronDriver

Source

pub fn new(context: &AeronDriverContext) -> Result<Self, AeronCError>

Create a AeronDriver struct and initialize from the AeronDriverContext struct.

The given AeronDriverContext struct will be used exclusively by the driver. Do not reuse between drivers.

§Parameters
  • context to use for initialization.
§Return

0 for success and -1 for error.

Source

pub fn context(&self) -> AeronDriverContext

Source

pub fn conductor(&self) -> AeronDriverConductor

Source

pub fn sender(&self) -> AeronDriverSender

Source

pub fn receiver(&self) -> AeronDriverReceiver

Source

pub fn runners(&self) -> [aeron_agent_runner_t; 3]

Source

pub fn start(&self, manual_main_loop: bool) -> Result<i32, AeronCError>

Start an AeronDriver given the threading mode. This may spawn threads for the Sender, Receiver, and Conductor depending on threading mode used.

§Parameters
  • manual_main_loop to be called by the caller for the Conductor do_work cycle.
§Return

0 for success and -1 for error.

Source

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

Call the Conductor (or Shared) main do_work duty cycle once.

Driver must have been created with manual_main_loop set to true.

§Return

0 for success and -1 for error.

Source

pub fn main_idle_strategy(&self, work_count: c_int)

Call the Conductor (or Shared) Idle Strategy.

§Parameters
  • work_count to pass to idle strategy.
Source

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

Close and delete AeronDriver struct.

§Return

0 for success and -1 for error.

Source

pub fn uri_get_offset_info(&self, offset: i32) -> &str

Source

pub fn threading_mode_to_string(&self, mode: aeron_threading_mode_t) -> &str

Source

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

Source§

impl AeronDriver

Source

pub fn launch_embedded( aeron_context: AeronDriverContext, register_sigint: bool, ) -> (Arc<AtomicBool>, JoinHandle<Result<(), AeronCError>>)

Source

pub fn wait_for_previous_media_driver_to_timeout( aeron_context: &AeronDriverContext, )

if you have existing shm files and its before the driver timeout it will try to reuse it and fail this makes sure that if that is the case it will wait else it proceeds

Trait Implementations§

Source§

impl Clone for AeronDriver

Source§

fn clone(&self) -> AeronDriver

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 AeronDriver

Source§

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

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

impl Deref for AeronDriver

Source§

type Target = aeron_driver_stct

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl From<&AeronDriver> for *mut aeron_driver_t

Source§

fn from(value: &AeronDriver) -> Self

Converts to this type from the input type.
Source§

impl From<*const aeron_driver_stct> for AeronDriver

Source§

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

Converts to this type from the input type.
Source§

impl From<*mut aeron_driver_stct> for AeronDriver

Source§

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

Converts to this type from the input type.
Source§

impl From<AeronDriver> for *mut aeron_driver_t

Source§

fn from(value: AeronDriver) -> Self

Converts to this type from the input type.
Source§

impl From<AeronDriver> for aeron_driver_t

Source§

fn from(value: AeronDriver) -> Self

Converts to this type from the input type.
Source§

impl From<aeron_driver_stct> for AeronDriver

Source§

fn from(value: aeron_driver_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.