#[derive(SyncTrace)]
{
// Attributes available to this derive:
#[trace]
}
Available on crate features
sync and proc_macro only.Expand description
Proc macro for deriving sync::Trace.
By default, this will call Trace::visit_children on all members of the type.
- If you wish to only visit specific members, you may annotate them with
#[trace], and only those members will be traced (other fields will be ignored). - If you wish to ignore a specific field, you may annote it with
#[trace(ignore)].
ยงExamples
- Default:
#[derive(SyncTrace)]
struct MyType {
default_traced_1: Agc<u64>,
default_traced_2: Agc<u64>,
}- Tracing specific fields:
#[derive(SyncTrace)]
struct MyType {
#[trace]
gc_field: Agc<u64>,
default_ignored: i64,
}- Ignoring specific fields:
#[derive(SyncTrace)]
struct MyType {
default_traced: Agc<u64>,
#[trace(ignore)]
ignored: i64,
}