pub struct AeronCounter { /* private fields */ }Implementations§
Source§impl AeronCounter
impl AeronCounter
pub fn new(async_: &AeronAsyncAddCounter) -> Result<Self, AeronCError>
Source§impl AeronCounter
impl AeronCounter
Sourcepub fn new_zeroed_on_heap() -> Self
pub fn new_zeroed_on_heap() -> Self
creates zeroed struct where the underlying c struct is on the heap
Sourcepub fn new_zeroed_on_stack() -> Self
pub fn new_zeroed_on_stack() -> Self
creates zeroed struct where the underlying c struct is on the stack (Use with care)
Sourcepub fn constants(
&self,
constants: &AeronCounterConstants,
) -> Result<i32, AeronCError>
pub fn constants( &self, constants: &AeronCounterConstants, ) -> Result<i32, AeronCError>
Sourcepub fn get_constants(&self) -> Result<AeronCounterConstants, AeronCError>
pub fn get_constants(&self) -> Result<AeronCounterConstants, AeronCError>
Fill in a structure with the constants in use by a counter.
pub fn get_inner(&self) -> *mut aeron_counter_t
Sourcepub unsafe fn get_inner_mut(&self) -> &mut aeron_counter_t
pub unsafe fn get_inner_mut(&self) -> &mut aeron_counter_t
Mutable access to the underlying C struct, minted from &self: nothing
prevents two live &mut at once, so the caller must ensure exclusive
access for the lifetime of the returned reference.
§Safety
No other reference (& or &mut) to the underlying struct may be
alive while the returned &mut is in use.
pub fn get_inner_ref(&self) -> &aeron_counter_t
Source§impl AeronCounter
impl AeronCounter
Sourcepub fn close(self) -> Result<(), AeronCError>
pub fn close(self) -> Result<(), AeronCError>
Closes this resource in the C client immediately; all clones of this handle become closed (their pointer is nulled) and must not be used.
Source§impl AeronCounter
impl AeronCounter
Sourcepub fn close_with_handler<AeronNotificationHandlerImpl: AeronNotificationCallback>(
self,
on_close_complete: Option<&Handler<AeronNotificationHandlerImpl>>,
) -> Result<(), AeronCError>
pub fn close_with_handler<AeronNotificationHandlerImpl: AeronNotificationCallback>( self, on_close_complete: Option<&Handler<AeronNotificationHandlerImpl>>, ) -> Result<(), AeronCError>
Like Self::close, but notifies on_close_complete when the close
finishes. The handler must outlive the notification (keep your
Handler alive until it has fired).
Source§impl AeronCounter
impl AeronCounter
pub fn addr_atomic(&self) -> &AtomicI64
Trait Implementations§
Source§impl Clone for AeronCounter
impl Clone for AeronCounter
Source§fn clone(&self) -> AeronCounter
fn clone(&self) -> AeronCounter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more