pub struct AeronClaim { /* private fields */ }Expand description
Zero-copy claim on a publication’s term buffer with a RAII commit-or-abort lifecycle.
A AeronClaim that is dropped without being explicitly committed or aborted
is aborted in Drop, releasing the term-buffer slot immediately
instead of waiting for AERON_PUBLICATION_UNBLOCK_TIMEOUT_NS (default 15s).
AeronClaim::commit / AeronClaim::abort consume self, encoding
Aeron’s one-shot claim contract in the type system.
Construct via AeronPublication::try_claim_owned or
AeronExclusivePublication::try_claim_owned; the claim is returned only on
a successful try_claim, so its inner buffer is always a genuinely claimed
slot (never a null zero-default).
Implementations§
Source§impl AeronClaim
impl AeronClaim
Sourcepub fn data(&mut self) -> &mut [u8] ⓘ
pub fn data(&mut self) -> &mut [u8] ⓘ
The writable claimed slice (zero-copy into the publication term buffer).
Sourcepub fn commit(self) -> Result<i64, AeronCError>
pub fn commit(self) -> Result<i64, AeronCError>
Commit the claimed bytes, publishing them to subscribers. Consumes self.
Sourcepub fn abort(self) -> Result<(), AeronCError>
pub fn abort(self) -> Result<(), AeronCError>
Abort the claim, discarding the slot as padding for subscribers.
Consumes self.