Struct RcuRefBox

Source
pub struct RcuRefBox<T, F>
where T: Send + 'static, F: RcuFlavor + 'static,
{ /* private fields */ }
Expand description

Defines a RCU reference to a element removed from a container.

Trait Implementations§

Source§

impl<T, F> Deref for RcuRefBox<T, F>
where T: Send + Deref, F: RcuFlavor,

Source§

type Target = <T as Deref>::Target

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl<T, F> Drop for RcuRefBox<T, F>
where T: Send + 'static, F: RcuFlavor + 'static,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<T, F> RcuRef<F> for RcuRefBox<T, F>
where T: Send, F: RcuFlavor,

§Safety
  • The underlying reference is cleaned up upon dropping.
  • There may be immutable borrows to the underlying reference.
  • There cannot be mutable borrows to the underlying reference.
Source§

type Output = BoxRefOwned<T>

The output type after taking ownership.
Source§

unsafe fn take_ownership_unchecked(self) -> Self::Output

Take ownership of the reference. Read more
Source§

fn take_ownership<C>(self, context: &mut C) -> Self::Output
where Self: Sized, C: RcuContext<Flavor = F>,

Take ownership of the reference.
Source§

fn defer_cleanup<C>(self, context: &mut C)
where Self: Sized, C: RcuDeferContext<Flavor = F>,

Configure a cleanup callback to be called after the grace period. Read more
Source§

fn call_cleanup<C>(self, context: &C)
where Self: Sized + Send + 'static, C: RcuReadContext<Flavor = F> + 'static,

Configure a cleanup callback to be called after the grace period. Read more
Source§

fn safe_cleanup(self)
where Self: Sized + Send + 'static, F: RcuFlavor,

Source§

impl<T, F> Send for RcuRefBox<T, F>
where T: Send, F: RcuFlavor,

§Safety

An RCU reference can be sent to another thread if T implements Send.

Auto Trait Implementations§

§

impl<T, F> Freeze for RcuRefBox<T, F>

§

impl<T, F> RefUnwindSafe for RcuRefBox<T, F>

§

impl<T, F> !Sync for RcuRefBox<T, F>

§

impl<T, F> Unpin for RcuRefBox<T, F>

§

impl<T, F> UnwindSafe for RcuRefBox<T, F>

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.