How to create a non-generic type containing a generic type

I am writing a software transaction library in rust, and the current semantics are defined as such:

A Transaction type will have a vector of closures to run, and some other bookkeeping data.
A DataEntry type is a container type that wraps over the underlying generic data with UnsafeCell, and some other synchronisation items (a bunch of atomics basically)

Now, ideally I want the Transaction type to be non-generic (because the moment it is defined as Transaction<T>, it is bound to the type T, and it cannot have association with multiple types of DataEntry), and the DataEntry to be generic. But the problem is, since the Transaction type has references to the the DataEntry, the Transaction type needs to carry the type information T as well.

I believe the implementation of GAT should allow me to do this pretty easily.

But I am wondering what I can do now. I am thinking of casting Arc to AtomicUsize to erase the type information with mem::transmute, as this is what I see crossbeam::sync::ArcCell is doing. Instead of using PhantomData to store information of the type, I can make the read/write functions generic.

pub struct Transaction<T> {
    data_refs: Vec<Arc<DataEntry<T>>>,
}

pub struct DataEntry<T> {
    data: UnsafeCell<T>,
    lock: AtomicUsize,
}


impl<T> for Transaction<T> {
    fn read(&mut self, data: Arc<DataEntry<T>>) -> T {
        ...
    }
    
    fn write(&mut self, data: Arc<DataEntry<T>>, new_val: T) {
        ...
    }
}

You can achieve this with dyn Trait:

trait DataEntryInterface {
    //...
}
pub struct Transaction {
    data_refs: Vec<Arc<dyn DataEntryInterface>>,
}
pub struct DataEntry<T> {
    data: UnsafeCell<T>,
    lock: AtomicUsize,
}
impl<T> DataEntryInterface for DataEntry<T> {
    //...
}