0

I want to have a reference to the parent struct from a child struct. What is the best possible way to achieve that ? Following example shows what i want.

Box::new(SingletonService {
            context_id,
            config: ServiceConfig::default(),
            queue_id: None,
            delta_store: DeltaStore {
                last_update: None,
                request_count: 0,
                deltas: HashMap::new(),
                proxy: &"Reference to parent SingletonService"
            },
        })
Lahiru Udayanga
  • 159
  • 2
  • 9

0 Answers0