macro_rules! root {
($ident:ident, $cx:ident) => { ... };
($ident:ident, init($init:expr), $cx:ident) => { ... };
($ident:ident, new($path:tt$(<$ty:ty>)?), $cx:ident) => { ... };
($ident:ident, $value:expr, $cx:ident) => { ... };
(@ $ident:ident, $value:expr, $cx:ident) => { ... };
}
Expand description
Creates a new root that will be traced during garbage collection. The value
returned by this macro is no longer bound to the Context
and so can be
used outside of the Context
’s lifetime. The root is tied to the stack, and
will be unrooted when it goes out of scope.