[−][src]Struct swim_mem::lease::Ref
A thread-safe, atomically counted, immutably dereferenceable hard
reference to a Resident
occupying a shared, Hold
-allocated memory block.
Methods
impl<'a, R: Resident> Ref<'a, R>
[src][−]
pub fn try_hold_new_meta<T, M>(
hold: &dyn Hold<'a>,
data: T,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromValue<Ref<'a, R>, T, M>,
[src]
hold: &dyn Hold<'a>,
data: T,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromValue<Ref<'a, R>, T, M>,
pub fn try_hold_clone_meta<T: ?Sized, M>(
hold: &dyn Hold<'a>,
data: &T,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromClone<Ref<'a, R>, T, M>,
[src]
hold: &dyn Hold<'a>,
data: &T,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromClone<Ref<'a, R>, T, M>,
pub unsafe fn try_hold_clone_unchecked_meta<T: ?Sized, M>(
hold: &dyn Hold<'a>,
data: &T,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCloneUnchecked<Ref<'a, R>, T, M>,
[src]
hold: &dyn Hold<'a>,
data: &T,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCloneUnchecked<Ref<'a, R>, T, M>,
pub fn try_hold_copy_meta<T: ?Sized, M>(
hold: &dyn Hold<'a>,
data: &T,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCopy<Ref<'a, R>, T, M>,
[src]
hold: &dyn Hold<'a>,
data: &T,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCopy<Ref<'a, R>, T, M>,
pub unsafe fn try_hold_copy_unchecked_meta<T: ?Sized, M>(
hold: &dyn Hold<'a>,
data: &T,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCopyUnchecked<Ref<'a, R>, T, M>,
[src]
hold: &dyn Hold<'a>,
data: &T,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCopyUnchecked<Ref<'a, R>, T, M>,
pub fn try_hold_empty_meta<M>(
hold: &dyn Hold<'a>,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromEmpty<Ref<'a, R>, M>,
[src]
hold: &dyn Hold<'a>,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromEmpty<Ref<'a, R>, M>,
pub fn try_hold_cap_meta<M>(
hold: &dyn Hold<'a>,
cap: usize,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentWithCapacity<Ref<'a, R>, M>,
[src]
hold: &dyn Hold<'a>,
cap: usize,
meta: M
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentWithCapacity<Ref<'a, R>, M>,
pub fn try_hold_new<T>(
hold: &dyn Hold<'a>,
data: T
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromValue<Ref<'a, R>, T>,
[src]
hold: &dyn Hold<'a>,
data: T
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromValue<Ref<'a, R>, T>,
pub fn try_hold_clone<T: ?Sized>(
hold: &dyn Hold<'a>,
data: &T
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromClone<Ref<'a, R>, T>,
[src]
hold: &dyn Hold<'a>,
data: &T
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromClone<Ref<'a, R>, T>,
pub unsafe fn try_hold_clone_unchecked<T: ?Sized>(
hold: &dyn Hold<'a>,
data: &T
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCloneUnchecked<Ref<'a, R>, T>,
[src]
hold: &dyn Hold<'a>,
data: &T
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCloneUnchecked<Ref<'a, R>, T>,
pub fn try_hold_copy<T: ?Sized>(
hold: &dyn Hold<'a>,
data: &T
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCopy<Ref<'a, R>, T>,
[src]
hold: &dyn Hold<'a>,
data: &T
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCopy<Ref<'a, R>, T>,
pub unsafe fn try_hold_copy_unchecked<T: ?Sized>(
hold: &dyn Hold<'a>,
data: &T
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCopyUnchecked<Ref<'a, R>, T>,
[src]
hold: &dyn Hold<'a>,
data: &T
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromCopyUnchecked<Ref<'a, R>, T>,
pub fn try_hold_empty(hold: &dyn Hold<'a>) -> Result<Ref<'a, R>, HoldError> where
R: ResidentFromEmpty<Ref<'a, R>>,
[src]
R: ResidentFromEmpty<Ref<'a, R>>,
pub fn try_hold_cap(
hold: &dyn Hold<'a>,
cap: usize
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentWithCapacity<Ref<'a, R>>,
[src]
hold: &dyn Hold<'a>,
cap: usize
) -> Result<Ref<'a, R>, HoldError> where
R: ResidentWithCapacity<Ref<'a, R>>,
pub fn hold_new<T>(hold: &dyn Hold<'a>, data: T) -> Ref<'a, R> where
R: ResidentFromValue<Ref<'a, R>, T>,
[src]
R: ResidentFromValue<Ref<'a, R>, T>,
pub fn hold_clone<T: ?Sized>(hold: &dyn Hold<'a>, data: &T) -> Ref<'a, R> where
R: ResidentFromClone<Ref<'a, R>, T>,
[src]
R: ResidentFromClone<Ref<'a, R>, T>,
pub unsafe fn hold_clone_unchecked<T: ?Sized>(
hold: &dyn Hold<'a>,
data: &T
) -> Ref<'a, R> where
R: ResidentFromCloneUnchecked<Ref<'a, R>, T>,
[src]
hold: &dyn Hold<'a>,
data: &T
) -> Ref<'a, R> where
R: ResidentFromCloneUnchecked<Ref<'a, R>, T>,
pub fn hold_copy<T: ?Sized>(hold: &dyn Hold<'a>, data: &T) -> Ref<'a, R> where
R: ResidentFromCopy<Ref<'a, R>, T>,
[src]
R: ResidentFromCopy<Ref<'a, R>, T>,
pub unsafe fn hold_copy_unchecked<T: ?Sized>(
hold: &dyn Hold<'a>,
data: &T
) -> Ref<'a, R> where
R: ResidentFromCopyUnchecked<Ref<'a, R>, T>,
[src]
hold: &dyn Hold<'a>,
data: &T
) -> Ref<'a, R> where
R: ResidentFromCopyUnchecked<Ref<'a, R>, T>,
pub fn hold_empty(hold: &dyn Hold<'a>) -> Ref<'a, R> where
R: ResidentFromEmpty<Ref<'a, R>>,
[src]
R: ResidentFromEmpty<Ref<'a, R>>,
pub fn hold_cap(hold: &dyn Hold<'a>, cap: usize) -> Ref<'a, R> where
R: ResidentWithCapacity<Ref<'a, R>>,
[src]
R: ResidentWithCapacity<Ref<'a, R>>,
pub fn new<T>(data: T) -> Ref<'a, R> where
R: ResidentFromValue<Ref<'a, R>, T>,
[src]
R: ResidentFromValue<Ref<'a, R>, T>,
pub fn from_clone<T: ?Sized>(data: &T) -> Ref<'a, R> where
R: ResidentFromClone<Ref<'a, R>, T>,
[src]
R: ResidentFromClone<Ref<'a, R>, T>,
pub unsafe fn from_clone_unchecked<T: ?Sized>(data: &T) -> Ref<'a, R> where
R: ResidentFromCloneUnchecked<Ref<'a, R>, T>,
[src]
R: ResidentFromCloneUnchecked<Ref<'a, R>, T>,
pub fn from_copy<T: ?Sized>(data: &T) -> Ref<'a, R> where
R: ResidentFromCopy<Ref<'a, R>, T>,
[src]
R: ResidentFromCopy<Ref<'a, R>, T>,
pub unsafe fn from_copy_unchecked<T: ?Sized>(data: &T) -> Ref<'a, R> where
R: ResidentFromCopyUnchecked<Ref<'a, R>, T>,
[src]
R: ResidentFromCopyUnchecked<Ref<'a, R>, T>,
pub fn empty() -> Ref<'a, R> where
R: ResidentFromEmpty<Ref<'a, R>>,
[src]
R: ResidentFromEmpty<Ref<'a, R>>,
pub fn with_cap(cap: usize) -> Ref<'a, R> where
R: ResidentWithCapacity<Ref<'a, R>>,
[src]
R: ResidentWithCapacity<Ref<'a, R>>,
pub unsafe fn from_raw(data: *mut R::Data) -> Ref<'a, R>
[src][+]
pub fn hard_count(this: &Ref<'a, R>) -> usize
[src][+]
pub fn soft_count(this: &Ref<'a, R>) -> usize
[src][+]
pub fn ref_count(this: &Ref<'a, R>) -> usize
[src][+]
pub fn metadata<'b>(this: &'b Ref<'a, R>) -> &'b R::Meta
[src][+]
pub fn try_to_unique(this: &Ref<'a, R>) -> Result<Mut<'a, R>, ArcError> where
R::Data: TryClone,
R::Meta: TryClone,
[src][+]
R::Data: TryClone,
R::Meta: TryClone,
pub fn to_unique(this: &Ref<'a, R>) -> Mut<'a, R> where
R::Data: TryClone,
R::Meta: TryClone,
[src][+]
R::Data: TryClone,
R::Meta: TryClone,
pub fn try_into_unique(this: Ref<'a, R>) -> Result<Mut<'a, R>, ArcError> where
R::Data: TryClone,
R::Meta: TryClone,
[src][+]
R::Data: TryClone,
R::Meta: TryClone,
pub fn into_unique(this: Ref<'a, R>) -> Mut<'a, R> where
R::Data: TryClone,
R::Meta: TryClone,
[src][+]
R::Data: TryClone,
R::Meta: TryClone,
pub unsafe fn into_mut(this: Ref<'a, R>) -> Mut<'a, R>
[src][+]
pub fn try_to_hard(this: &Ref<'a, R>) -> Result<Hard<'a, R>, ArcError>
[src][+]
pub fn to_hard(this: &Ref<'a, R>) -> Hard<'a, R>
[src][+]
pub fn into_hard(this: Ref<'a, R>) -> Hard<'a, R>
[src][+]
pub fn try_to_soft(this: &Ref<'a, R>) -> Result<Soft<'a, R>, ArcError>
[src][+]
pub fn to_soft(this: &Ref<'a, R>) -> Soft<'a, R>
[src][+]
pub fn try_into_soft(this: Ref<'a, R>) -> Result<Soft<'a, R>, ArcError>
[src][+]
pub fn into_soft(this: Ref<'a, R>) -> Soft<'a, R>
[src][+]
pub unsafe fn into_raw(this: Ref<'a, R>) -> *mut R::Data
[src][+]
pub unsafe fn as_ptr_unchecked(this: &Ref<'a, R>) -> *mut R::Data
[src][+]
pub fn try_unwrap(this: Ref<'a, R>) -> Result<R::Target, Ref<'a, R>> where
R: ResidentUnwrap<Ref<'a, R>>,
[src][+]
R: ResidentUnwrap<Ref<'a, R>>,
pub fn unwrap(this: Ref<'a, R>) -> R::Target where
R: ResidentUnwrap<Ref<'a, R>>,
[src][+]
R: ResidentUnwrap<Ref<'a, R>>,
Trait Implementations
impl<'a, R: Resident> Holder<'a> for Ref<'a, R>
[src][+]
impl<'a, R: Resident> TryClone for Ref<'a, R>
[src][+]
impl<'a, R: Resident> Lease for Ref<'a, R>
[src][+]
impl<'a, R: ResidentPartialEq<Ref<'a, R>, T>, T: ?Sized> PartialEq<T> for Ref<'a, R>
[src][+]
impl<'a, R: ResidentEq<Ref<'a, R>>> Eq for Ref<'a, R>
[src]
impl<'a, R: ResidentOrd<Ref<'a, R>>> Ord for Ref<'a, R>
[src][+]
impl<'a, R: ResidentPartialOrd<Ref<'a, R>, T>, T: ?Sized> PartialOrd<T> for Ref<'a, R>
[src][+]
impl<'a, R: ResidentDeref<Ref<'a, R>>> Deref for Ref<'a, R>
[src][+]
impl<'a, R: ResidentDisplay<Ref<'a, R>>> Display for Ref<'a, R>
[src][+]
impl<'a, R: ResidentDebug<Ref<'a, R>>> Debug for Ref<'a, R>
[src][+]
impl<'a, R: ResidentAdd<Ref<'a, R>, Rhs>, Rhs> Add<Rhs> for Ref<'a, R>
[src][+]
impl<'a, R: Resident> Drop for Ref<'a, R>
[src][+]
impl<'a, R: ResidentIndex<Ref<'a, R>, Idx>, Idx> Index<Idx> for Ref<'a, R>
[src][+]
impl<'a, R: ResidentHash<Ref<'a, R>>> Hash for Ref<'a, R>
[src][+]
impl<'a, R: Resident> Sync for Ref<'a, R> where
R::Data: Sync,
R::Meta: Sync,
[src]
R::Data: Sync,
R::Meta: Sync,
impl<'a, R: ResidentIntoIterator<Ref<'a, R>>> IntoIterator for Ref<'a, R>
[src][+]
impl<'a, R: ResidentIntoRefIterator<'a, Ref<'a, R>>> IntoIterator for &'a Ref<'a, R>
[src][+]
impl<'a, R: Resident> Send for Ref<'a, R> where
R::Data: Send,
R::Meta: Send,
[src]
R::Data: Send,
R::Meta: Send,
impl<'a, R: Resident> Pointer for Ref<'a, R>
[src][+]
impl<'a, R: Resident> Clone for Ref<'a, R>
[src][+]
impl<'a, R: ResidentAsRef<Ref<'a, R>, T>, T: ?Sized> AsRef<T> for Ref<'a, R>
[src][+]
Blanket Implementations
impl<T> From for T
[src][−]
impl<I> IntoIterator for I where
I: Iterator,
[src][−]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src][+]
impl<T, U> TryFrom for T where
U: Into<T>,
[src][−]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src][+]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src][−]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src][+]
impl<T, U> Into for T where
U: From<T>,
[src][−]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src][−]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src][−]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src][+]
impl<T> Any for T where
T: 'static + ?Sized,
[src][−]
T: 'static + ?Sized,