Struct rusteron_client::AeronCountersReader

source ·
pub struct AeronCountersReader { /* private fields */ }

Implementations§

source§

impl AeronCountersReader

source

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

source

pub fn get_buffers( &self, buffers: &AeronCountersReaderBuffers, ) -> Result<i32, AeronCError>

Get buffer pointers and lengths for the counters reader.

§Parameters
  • reader reader containing the buffers.

  • buffers output structure to return the buffers.

§Return

-1 on failure, 0 on success.

source

pub fn foreach_counter<AeronCountersReaderForeachCounterFuncHandlerImpl: AeronCountersReaderForeachCounterFuncCallback>( &self, func: Option<&Handler<AeronCountersReaderForeachCounterFuncHandlerImpl>>, )

Iterate over the counters in the counters_reader and call the given function for each counter.

§Parameters
  • func to call for each counter.

  • clientd to pass for each call to func.

source

pub fn find_by_type_id_and_registration_id( &self, type_id: i32, registration_id: i64, ) -> i32

Iterate over allocated counters and find the first matching a given type id and registration id.

§Parameters
  • type_id to find.

  • registration_id to find.

§Return

the counter id if found otherwise AERON_NULL_COUNTER_ID.

source

pub fn max_counter_id(&self) -> i32

Get the current max counter id.

§Return

-1 on failure, max counter id on success.

source

pub fn addr(&self, counter_id: i32) -> &mut i64

Get the address for a counter.

§Parameters
  • counter_id to find
§Return

address of the counter value

source

pub fn counter_registration_id( &self, counter_id: i32, ) -> Result<i64, AeronCError>

Get the registration id assigned to a counter.

§Parameters
  • counter_id for which the registration id is requested.

  • registration_id pointer for value to be set on success.

source

pub fn counter_owner_id(&self, counter_id: i32) -> Result<i64, AeronCError>

Get the owner id assigned to a counter which will typically be the client id.

§Parameters
  • counter_id for which the owner id is requested.

  • owner_id pointer for value to be set on success.

source

pub fn counter_reference_id(&self, counter_id: i32) -> Result<i64, AeronCError>

Get the reference id assigned to a counter which will typically be the registration id of an associated Image, Subscription, Publication, etc.

§Parameters
  • counter_id for which the reference id is requested.

  • reference_id pointer for value to be set on success.

source

pub fn counter_state(&self, counter_id: i32) -> Result<i32, AeronCError>

Get the state for a counter.

§Parameters
  • counter_id to find

  • state out pointer for the current state to be stored in.

source

pub fn counter_type_id(&self, counter_id: i32) -> Result<i32, AeronCError>

Get the type id for a counter.

§Parameters
  • counter_id to find
source

pub fn counter_label( &self, counter_id: i32, buffer: *mut c_char, buffer_length: usize, ) -> Result<i32, AeronCError>

Get the label for a counter.

§Parameters
  • counter_id to find

  • buffer to store the counter in.

  • buffer_length length of the output buffer

§Return

-1 on failure, number of characters copied to buffer on success.

source

pub fn free_for_reuse_deadline_ms( &self, counter_id: i32, ) -> Result<i64, AeronCError>

Get the free for reuse deadline (ms) for a counter.

§Parameters
  • counter_id to find.

  • deadline_ms output value to store the deadline.

source

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

§

impl AeronCountersReader

pub fn get_counter_label( &self, counter_id: i32, max_length: usize, ) -> Result<String, AeronCError>

Get the label for a counter.

param counters_reader that contains the counter

param counter_id to find

param buffer to store the counter in.

param buffer_length length of the output buffer

return -1 on failure, number of characters copied to buffer on success.

Trait Implementations§

source§

impl Clone for AeronCountersReader

source§

fn clone(&self) -> AeronCountersReader

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 AeronCountersReader

source§

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

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

impl Deref for AeronCountersReader

source§

type Target = aeron_counters_reader_stct

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl From<&AeronCountersReader> for *mut aeron_counters_reader_t

source§

fn from(value: &AeronCountersReader) -> Self

Converts to this type from the input type.
source§

impl From<*const aeron_counters_reader_stct> for AeronCountersReader

source§

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

Converts to this type from the input type.
source§

impl From<*mut aeron_counters_reader_stct> for AeronCountersReader

source§

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

Converts to this type from the input type.
source§

impl From<AeronCountersReader> for *mut aeron_counters_reader_t

source§

fn from(value: AeronCountersReader) -> Self

Converts to this type from the input type.
source§

impl From<AeronCountersReader> for aeron_counters_reader_t

source§

fn from(value: AeronCountersReader) -> Self

Converts to this type from the input type.
source§

impl From<aeron_counters_reader_stct> for AeronCountersReader

source§

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