Skip to main content

Ref

Struct Ref 

Source
pub struct Ref<'a, T: ResourceHandle> { /* private fields */ }
Expand description

A pointer borrowed from an owner. It cannot escape that borrow or clone the owning handle. No allocation or reference-count operation is needed.

Implementations§

Source§

impl<'a, S: ResourceStorage<aeron_cnc_t>> Ref<'a, AeronCnc<S>>

Source

pub fn counters_reader(&self) -> Ref<'a, AeronCountersReader>

Gets a counters reader for this command and control file. This does not need to be closed manually, resources are tied to the instance of aeron_cnc.

§Return

pointer to a counters reader.

Source§

impl<'a, S: ResourceStorage<aeron_image_constants_t>> Ref<'a, AeronImageConstants<S>>

Source§

impl<'a, S: ResourceStorage<aeron_str_to_ptr_hash_map_t>> Ref<'a, AeronStrToPtrHashMap<S>>

Source

pub fn keys(&self) -> Ref<'a, AeronStrToPtrHashMapKey>

Source§

impl<'a, S: ResourceStorage<aeron_t>> Ref<'a, Aeron<S>>

Source

pub fn context(&self) -> Ref<'a, AeronContext>

Return the AeronContext that is in use by the given client.

§Return

the AeronContext for the given client or NULL for an error.

Source

pub fn counters_reader(&self) -> Ref<'a, AeronCountersReader>

Return a reference to the counters reader of the given client.

The AeronCountersReader is maintained by the client. And should not be freed.

§Return

AeronCountersReader or NULL for error.

Source§

impl<'a, S: ResourceStorage<aeron_uri_params_t>> Ref<'a, AeronUriParams<S>>

Source

pub fn array(&self) -> Ref<'a, AeronUriParam>

Trait Implementations§

Source§

impl<T: ResourceHandle> Debug for Ref<'_, T>
where T::Borrowed: Debug,

Source§

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

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

impl<T: ResourceHandle> Deref for Ref<'_, T>

Source§

type Target = <T as ResourceHandle>::Borrowed

The resulting type after dereferencing.
Source§

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

Dereferences the value.

Auto Trait Implementations§

§

impl<'a, T> Freeze for Ref<'a, T>
where <T as ResourceHandle>::Borrowed: Freeze,

§

impl<'a, T> RefUnwindSafe for Ref<'a, T>
where <T as ResourceHandle>::Borrowed: RefUnwindSafe, T: RefUnwindSafe,

§

impl<'a, T> Send for Ref<'a, T>
where <T as ResourceHandle>::Borrowed: Send, T: Sync,

§

impl<'a, T> Sync for Ref<'a, T>
where <T as ResourceHandle>::Borrowed: Sync, T: Sync,

§

impl<'a, T> Unpin for Ref<'a, T>
where <T as ResourceHandle>::Borrowed: Unpin,

§

impl<'a, T> UnsafeUnpin for Ref<'a, T>
where <T as ResourceHandle>::Borrowed: UnsafeUnpin,

§

impl<'a, T> UnwindSafe for Ref<'a, T>
where <T as ResourceHandle>::Borrowed: UnwindSafe, T: RefUnwindSafe,

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, 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.