Trait riddle_common::CloneHandle[][src]

pub trait CloneHandle {
    type Handle: Deref<Target = Self>;
    type WeakHandle;
    fn clone_handle(&self) -> Self::Handle;
fn clone_weak_handle(&self) -> Self::WeakHandle; }

Trait for objects that contain a weak reference to themselves, to allow functions which get references to those objects to clone handles to those objects.

Associated Types

type Handle: Deref<Target = Self>[src]

The type which represents a strong reference, and which may be dereferenced as Self.

type WeakHandle[src]

The type which represents a weak reference.

Loading content...

Required methods

fn clone_handle(&self) -> Self::Handle[src]

Clone a strong handle to the object.

Panic

Panics if the weak reference is invalid. Should only happen if a handle is being cloned during the Drop::drop method for self.

fn clone_weak_handle(&self) -> Self::WeakHandle[src]

Clone a weak handle to the object.

Loading content...

Implementors

Loading content...