Skip to main content

AeronPublicationErrorValuesOwned

Struct AeronPublicationErrorValuesOwned 

Source
pub struct AeronPublicationErrorValuesOwned(/* private fields */);
Expand description

A publication error frame copied by AeronPublicationErrorValues::try_to_owned.

Implementations§

Source§

impl AeronPublicationErrorValuesOwned

Source

pub fn error_message(&self) -> &str

The full message as UTF-8. Invalid UTF-8 returns "<invalid UTF-8>". Use Self::error_message_bytes to read the original bytes.

Source

pub fn error_message_bytes(&self) -> &[u8] ⓘ

The full message bytes.

Methods from Deref<Target = AeronPublicationErrorValuesRef>§

Source

pub fn registration_id(&self) -> i64

Source

pub fn destination_registration_id(&self) -> i64

Source

pub fn session_id(&self) -> i32

Source

pub fn stream_id(&self) -> i32

Source

pub fn receiver_id(&self) -> i64

Source

pub fn group_tag(&self) -> i64

Source

pub fn address_type(&self) -> i16

Source

pub fn source_port(&self) -> u16

Source

pub fn source_address(&self) -> [u8; 16]

Source

pub fn error_code(&self) -> i32

Source

pub fn error_message_length(&self) -> i32

Source

pub fn error_message(&self) -> [u8; 1]

Source

pub unsafe fn delete(&self)

Delete a instance of AeronPublicationErrorValues that was created when making a copy (aeron_publication_error_values_copy). This should not be use on the pointer received via the aeron_frame_handler_t.

§Safety

This bypasses Rust ownership. Keep all retained pointers valid until native cleanup. Initializers require exclusive access and must not overwrite live native state or invalidate borrowed views. After raw removal or deletion, prevent all further access and Rust cleanup through every alias. Prefer the owning handle’s constructor, close or cancel method.

Source

pub fn as_ref(&self) -> Ref<'_, Self>

Borrow this handle without cloning its owner.

Source

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

Source

pub unsafe fn get_inner_mut(&self) -> &mut aeron_publication_error_values_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.

Source

pub unsafe fn get_inner_ref(&self) -> &aeron_publication_error_values_t

Borrow the native struct.

§Safety

No Rust or native call may mutate the struct while this reference is alive. Shared wrappers also require coordination with other threads.

Source

pub fn try_to_owned( &self, ) -> Result<AeronPublicationErrorValuesOwned, AeronCError>

Copy this error frame and its full message so it can outlive the callback. Aeron allocates the copy. Reading the borrowed frame does not allocate.

Trait Implementations§

Source§

impl Debug for AeronPublicationErrorValuesOwned

Source§

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

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

impl Deref for AeronPublicationErrorValuesOwned

Source§

type Target = AeronPublicationErrorValues

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl Display for AeronPublicationErrorValuesOwned

Source§

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

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

impl Drop for AeronPublicationErrorValuesOwned

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for AeronPublicationErrorValuesOwned

Source§

impl Sync for AeronPublicationErrorValuesOwned

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> 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.