[][src]Macro refptr::make_refptr

macro_rules! make_refptr {
    ($($seg:ident $(::<$($t:ty),*>)?)::+ { $($f:tt)* }) => { ... };
}

Allocate a new instance of a Refcounted struct using a struct literal.

Returns a RefPtr<T> strong reference to the newly allocated struct.

Example

#[refcounted(local)]
struct HeapInt { value: i32 }

let ptr = make_refptr!(HeapInt { value: 10 });