[−][src]Struct refptr::RefPtr
Strong reference to a Refcounted
object.
Implementations
impl<T: ?Sized + Refcounted> RefPtr<T>
[src]
pub fn new(val: &T) -> RefPtr<T>
[src]
Obtain a strong reference to a Refcounted
object.
pub unsafe fn from_raw(val: *const T) -> RefPtr<T>
[src]
Recover a RefPtr
from a raw pointer which was previously returned from
into_raw
. This does not increment the reference count.
pub fn into_raw(this: Self) -> *const T
[src]
Acquire a raw pointer to the allocation, consuming the RefPtr
.
Trait Implementations
impl<T: ?Sized + Refcounted> Clone for RefPtr<T>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: ?Sized + Refcounted + Debug> Debug for RefPtr<T>
[src]
impl<T: ?Sized + Refcounted> Deref for RefPtr<T>
[src]
impl<T: ?Sized + Refcounted + Display> Display for RefPtr<T>
[src]
impl<T: ?Sized + Refcounted> Drop for RefPtr<T>
[src]
impl<T: ?Sized + Refcounted + Eq> Eq for RefPtr<T>
[src]
impl<'_, T: ?Sized + Refcounted> From<&'_ T> for RefPtr<T>
[src]
impl<T: ?Sized + Refcounted + Hash> Hash for RefPtr<T>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: ?Sized + Refcounted + Ord> Ord for RefPtr<T>
[src]
fn cmp(&self, other: &RefPtr<T>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: ?Sized + Refcounted + PartialEq> PartialEq<RefPtr<T>> for RefPtr<T>
[src]
impl<T: ?Sized + Refcounted + PartialOrd> PartialOrd<RefPtr<T>> for RefPtr<T>
[src]
fn partial_cmp(&self, other: &RefPtr<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &RefPtr<T>) -> bool
[src]
fn le(&self, other: &RefPtr<T>) -> bool
[src]
fn gt(&self, other: &RefPtr<T>) -> bool
[src]
fn ge(&self, other: &RefPtr<T>) -> bool
[src]
impl<T: ?Sized + Refcounted> Pointer for RefPtr<T>
[src]
impl<T: ?Sized + Refcounted + Sync + Send> Send for RefPtr<T>
[src]
impl<T: ?Sized + Refcounted + Sync + Send> Sync for RefPtr<T>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> 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<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,