Macro make_refptr

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

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 });