pub struct AeronArchiveAsyncConnect { /* private fields */ }Implementations§
Source§impl AeronArchiveAsyncConnect
impl AeronArchiveAsyncConnect
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)
pub fn get_inner(&self) -> *mut aeron_archive_async_connect_t
Sourcepub unsafe fn get_inner_mut(&self) -> &mut aeron_archive_async_connect_t
pub unsafe fn get_inner_mut(&self) -> &mut aeron_archive_async_connect_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_archive_async_connect_t
Source§impl AeronArchiveAsyncConnect
impl AeronArchiveAsyncConnect
pub fn new(ctx: &AeronArchiveContext) -> Result<Self, AeronCError>
pub fn poll(&self) -> Result<Option<AeronArchive>, AeronCError>
Sourcepub fn poll_blocking(
&self,
timeout: Duration,
) -> Result<AeronArchive, AeronCError>
pub fn poll_blocking( &self, timeout: Duration, ) -> Result<AeronArchive, AeronCError>
Polls synchronously until the async operation completes or timeout elapses.
Convenience for examples and tests only. It blocks the calling thread
in a busy-poll loop. In production, drive poll() from your own event loop
(between other work, on a timer, or in a dedicated duty cycle) rather than
blocking on a single operation.
§Production pattern (pseudo code)
// Don't block — integrate poll() into your existing loop
loop {
if let Some(resource) = poller.poll()? {
break; // ready
}
do_other_work(); // service other subscriptions, timers, etc.
}See the blocking add_*(.., timeout) helpers for the same caveat.
Source§impl AeronArchiveAsyncConnect
impl AeronArchiveAsyncConnect
Sourcepub fn new_with_aeron(
ctx: &AeronArchiveContext,
aeron: &Aeron,
) -> Result<Self, AeronCError>
pub fn new_with_aeron( ctx: &AeronArchiveContext, aeron: &Aeron, ) -> Result<Self, AeronCError>
recommend using this method instead of standard new as it will link the archive to aeron so if a drop occurs archive is dropped before aeron
Trait Implementations§
Source§impl Clone for AeronArchiveAsyncConnect
impl Clone for AeronArchiveAsyncConnect
Source§fn clone(&self) -> AeronArchiveAsyncConnect
fn clone(&self) -> AeronArchiveAsyncConnect
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more