pub struct RcuRef<T, M>{ /* private fields */ }
Expand description
A smard pointer for a reference to the content of an super::Rcu
Implementations§
Source§impl<T: ?Sized, M: ?Sized> RcuRef<T, M>
impl<T: ?Sized, M: ?Sized> RcuRef<T, M>
Sourcepub fn map<N: ?Sized, F: for<'a> FnOnce(&'a M) -> &'a N>(
reference: Self,
f: F,
) -> RcuRef<T, N>
pub fn map<N: ?Sized, F: for<'a> FnOnce(&'a M) -> &'a N>( reference: Self, f: F, ) -> RcuRef<T, N>
apply the mapping function to the reference in this RcuRef
Sourcepub fn try_map<N: ?Sized, F: for<'a> FnOnce(&'a M) -> Option<&'a N>>(
reference: Self,
f: F,
) -> Option<RcuRef<T, N>>
pub fn try_map<N: ?Sized, F: for<'a> FnOnce(&'a M) -> Option<&'a N>>( reference: Self, f: F, ) -> Option<RcuRef<T, N>>
try to apply the faillable mapping function to the reference in this RcuRef
Sourcepub fn same_epoch<M2>(this: &Self, other: &RcuRef<T, M2>) -> bool
pub fn same_epoch<M2>(this: &Self, other: &RcuRef<T, M2>) -> bool
Check whether the two RcuRefs reference values in the same epoch
Sourcepub fn ptr_eq(this: &Self, other: &Self) -> bool
pub fn ptr_eq(this: &Self, other: &Self) -> bool
Compares the RcuRefs references via core::ptr::eq
Sourcepub fn ptr_addr_eq(this: &Self, other: &Self) -> bool
pub fn ptr_addr_eq(this: &Self, other: &Self) -> bool
Compares the RcuRefs references via core::ptr::addr_eq
Trait Implementations§
Auto Trait Implementations§
impl<T, M> Freeze for RcuRef<T, M>
impl<T, M> RefUnwindSafe for RcuRef<T, M>
impl<T, M> !Send for RcuRef<T, M>
impl<T, M> !Sync for RcuRef<T, M>
impl<T, M> Unpin for RcuRef<T, M>
impl<T, M> UnwindSafe for RcuRef<T, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more