Closed lhr0909 closed 3 years ago
Hi, here I am once again with a small question :D
I currently would like to do the following so I can expose and serialize the TxnContext in the Txn, hoping to persist it somewhere after any update.
use dgraph_tonic::{TxnContext, TxnMutatedType}; use dgraph_tonic::client::lazy::ILazyClient; pub trait TxnContextExport { fn get_txn_context(&self) -> TxnContext; } impl<C: ILazyClient> TxnContextExport for TxnMutatedType<C> { fn get_txn_context(&self) -> TxnContext { self.context.clone() } }
However, I think right now ILazyClient is private. So I am hoping to see if I can expose it somehow to make this work.
ILazyClient
Hi, sorry for latter response.
New release support to get transaction context on all variants
Hi, here I am once again with a small question :D
I currently would like to do the following so I can expose and serialize the TxnContext in the Txn, hoping to persist it somewhere after any update.
However, I think right now
ILazyClient
is private. So I am hoping to see if I can expose it somehow to make this work.