[][src]Struct sm_ext::HandleRef

pub struct HandleRef<'ty, T> { /* fields omitted */ }

Wrapper for a HandleId that is Deref to the wrapping type.

Methods

impl<'ty, T> HandleRef<'ty, T>[src]

pub fn new(
    ty: &'ty HandleType<T>,
    handle: HandleId,
    owner: IdentityTokenPtr
) -> Result<Self, HandleError>
[src]

pub fn clone_handle(
    &self,
    new_owner: IdentityTokenPtr
) -> Result<HandleId, HandleError>
[src]

Trait Implementations

impl<'_, T> Debug for HandleRef<'_, T>[src]

impl<'_, T> Deref for HandleRef<'_, T>[src]

type Target = T

The resulting type after dereferencing.

impl<'_, T> DerefMut for HandleRef<'_, T>[src]

This is unsound if multiple HandleRefs are created wrapping the same Handle data.

To guarantee safety, do not use mutable HandleRefs but instead use a std::cell::RefCell wrapper inside your HandleType.

impl<'_, T> Drop for HandleRef<'_, T>[src]

impl<'ctx, 'ty, T: HasHandleType> TryFromPlugin<'ctx, cell_t> for HandleRef<'ty, T>[src]

type Error = HandleError

Auto Trait Implementations

impl<'ty, T> RefUnwindSafe for HandleRef<'ty, T> where
    T: RefUnwindSafe

impl<'ty, T> !Send for HandleRef<'ty, T>

impl<'ty, T> !Sync for HandleRef<'ty, T>

impl<'ty, T> Unpin for HandleRef<'ty, T>

impl<'ty, T> UnwindSafe for HandleRef<'ty, T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?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> TryFromPlugin<'_, T> for U where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::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.

impl<'ctx, T, U> TryIntoPlugin<'ctx, U> for T where
    U: TryFromPlugin<'ctx, T>, 
[src]

type Error = <U as TryFromPlugin<'ctx, T>>::Error