pub struct AeronExclusivePublication { /* private fields */ }

Implementations§

source§

impl AeronExclusivePublication

source

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

source

pub fn offer<AeronReservedValueSupplierHandlerImpl: AeronReservedValueSupplierCallback>( &self, buffer: &[u8], reserved_value_supplier: Option<&Handler<AeronReservedValueSupplierHandlerImpl>>, ) -> i64

Non-blocking publish of a buffer containing a message.

§Parameters
  • buffer to publish.

  • length of the buffer.

  • reserved_value_supplier to use for setting the reserved value field or NULL.

  • clientd to pass to the reserved_value_supplier.

§Return

the new stream position otherwise a negative error value.

source

pub fn offerv<AeronReservedValueSupplierHandlerImpl: AeronReservedValueSupplierCallback>( &self, iov: &AeronIovec, iovcnt: usize, reserved_value_supplier: Option<&Handler<AeronReservedValueSupplierHandlerImpl>>, ) -> i64

Non-blocking publish by gathering buffer vectors into a message.

§Parameters
  • iov array for the vectors

  • iovcnt of the number of vectors

  • reserved_value_supplier to use for setting the reserved value field or NULL.

  • clientd to pass to the reserved_value_supplier.

§Return

the new stream position otherwise a negative error value.

source

pub fn try_claim(&self, length: usize, buffer_claim: &AeronBufferClaim) -> i64

Try to claim a range in the publication log into which a message can be written with zero copy semantics. Once the message has been written then aeron_buffer_claim_commit should be called thus making it available. A claim length cannot be greater than max payload length.

Note: This method can only be used for message lengths less than MTU length minus header.

@code AeronBufferClaim buffer_claim;

if (AeronExclusivePublicationry_claim(publication, length, &buffer_claim) > 0L) { // work with buffer_claim->data directly. aeron_buffer_claim_commit(&buffer_claim); } @endcode

§Parameters
  • length of the message.

  • buffer_claim to be populated if the claim succeeds.

§Return

the new stream position otherwise a negative error value.

source

pub fn append_padding(&self, length: usize) -> i64

Append a padding record log of a given length to make up the log to a position.

§Parameters
  • length of the range to claim, in bytes.
§Return

the new stream position otherwise a negative error value.

source

pub fn offer_block(&self, buffer: &[u8]) -> i64

Offer a block of pre-formatted message fragments directly into the current term.

§Parameters
  • buffer containing the pre-formatted block of message fragments.

  • offset offset in the buffer at which the first fragment begins.

§Return

the new stream position otherwise a negative error value.

source

pub fn channel_status(&self) -> i64

Get the status of the media channel for this publication.

The status will be ERRORED (-1) if a socket exception occurs on setup and ACTIVE (1) if all is well.

§Return

1 for ACTIVE, -1 for ERRORED

source

pub fn constants( &self, constants: &AeronPublicationConstants, ) -> Result<i32, AeronCError>

Fill in a structure with the constants in use by a publication.

§Parameters
  • publication to get the constants for.

  • constants structure to fill in with the constants

§Return

0 for success and -1 for error.

source

pub fn position(&self) -> i64

Get the current position to which the publication has advanced for this stream.

§Return

the current position to which the publication has advanced for this stream or a negative error value.

source

pub fn position_limit(&self) -> i64

Get the position limit beyond which this publication will be back pressured.

This should only be used as a guide to determine when back pressure is likely to be applied.

§Return

the position limit beyond which this publication will be back pressured or a negative error value.

source

pub fn close<AeronNotificationHandlerImpl: AeronNotificationCallback>( &self, on_close_complete: Option<&Handler<AeronNotificationHandlerImpl>>, ) -> Result<i32, AeronCError>

Asynchronously close the publication.

§Return

0 for success or -1 for error.

source

pub fn is_closed(&self) -> bool

Has the exclusive publication closed?

§Return

true if this publication is closed.

source

pub fn is_connected(&self) -> bool

Has the exclusive publication seen an active Subscriber recently?

§Return

true if this publication has recently seen an active subscriber otherwise false.

source

pub fn local_sockaddrs( &self, address_vec: &AeronIovec, address_vec_len: usize, ) -> Result<i32, AeronCError>

Get all of the local socket addresses for this exclusive publication. Typically only one representing the control address.

@see aeron_subscription_local_Sockaddrs

§Parameters
  • address_vec to hold the received addresses

  • address_vec_len available length of the vector to hold the addresses

§Return

number of addresses found or -1 if there is an error.

source

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

source§

impl AeronExclusivePublication

Trait Implementations§

source§

impl Clone for AeronExclusivePublication

source§

fn clone(&self) -> AeronExclusivePublication

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 AeronExclusivePublication

source§

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

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

impl Deref for AeronExclusivePublication

source§

type Target = aeron_exclusive_publication_stct

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl From<&AeronExclusivePublication> for *mut aeron_exclusive_publication_t

source§

fn from(value: &AeronExclusivePublication) -> Self

Converts to this type from the input type.
source§

impl From<*const aeron_exclusive_publication_stct> for AeronExclusivePublication

source§

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

Converts to this type from the input type.
source§

impl From<*mut aeron_exclusive_publication_stct> for AeronExclusivePublication

source§

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

Converts to this type from the input type.
source§

impl From<AeronExclusivePublication> for *mut aeron_exclusive_publication_t

source§

fn from(value: AeronExclusivePublication) -> Self

Converts to this type from the input type.
source§

impl From<AeronExclusivePublication> for aeron_exclusive_publication_t

source§

fn from(value: AeronExclusivePublication) -> Self

Converts to this type from the input type.
source§

impl From<aeron_exclusive_publication_stct> for AeronExclusivePublication

source§

fn from(value: aeron_exclusive_publication_t) -> Self

Converts to this type from the input type.
§

impl Send for AeronExclusivePublication

§

impl Sync for AeronExclusivePublication

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.