[][src]Struct memory_slice::OwnedRef

#[repr(transparent)]pub struct OwnedRef<'a, T>(_);

A reference that drops its pointee when it is dropped

Hold a reference to a value of type T that is dropped when the OwnedRef is dropped

Implementations

impl<'a, T> OwnedRef<'a, T>[src]

pub unsafe fn new(v: &'a mut T) -> Self[src]

Returns an OwnedRef to v.

Safety

v shall not be destroyed by other means

Trait Implementations

impl<'a, T> AsMut<T> for OwnedRef<'a, T>[src]

impl<'a, T> AsRef<T> for OwnedRef<'a, T>[src]

impl<'a, T> Deref for OwnedRef<'a, T>[src]

type Target = T

The resulting type after dereferencing.

impl<'a, T> DerefMut for OwnedRef<'a, T>[src]

impl<'a, T> Drop for OwnedRef<'a, T>[src]

Auto Trait Implementations

impl<'a, T> Send for OwnedRef<'a, T> where
    T: Send

impl<'a, T> Sync for OwnedRef<'a, T> where
    T: Sync

impl<'a, T> Unpin for OwnedRef<'a, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsMemory for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.