Derive Macro jrsonnet_gcmodule::Trace
source · #[derive(Trace)]
{
// Attributes available to this derive:
#[trace]
}
Expand description
Derive Trace
implementation for a structure.
Examples
use jrsonnet_gcmodule::{Cc, Trace};
#[derive(Trace)]
struct S1(u32, String);
#[derive(Trace)]
struct S2<T1: Trace, T2: Trace>(T1, T2, u8);
#[derive(Trace)]
struct S3<T: Trace> {
a: S1,
b: Option<S2<T, u8>>,
#[trace(skip)]
c: AlienStruct, // c is not tracked by the collector.
}
struct AlienStruct;