I need to track final dropping of Database object in Arc. In particular I need delete databases (i.e. by calling Database::delete()) which was removed by the application when all references to it is dead.
My idea is a newtype wrapper for Database. I created the struct WrappedDatabase and implemented Deref trait for this newtype, but it still doesn't allows me to create cursors using Arc<WrappedDatabase> because it requires something which implements Into<Supercow<'a, Database>>.
Are anybody known a right solution?
I need to track final dropping of
Databaseobject inArc. In particular I need delete databases (i.e. by callingDatabase::delete()) which was removed by the application when all references to it is dead.My idea is a newtype wrapper for
Database. I created thestruct WrappedDatabaseand implementedDereftrait for this newtype, but it still doesn't allows me to create cursors usingArc<WrappedDatabase>because it requires something which implementsInto<Supercow<'a, Database>>.Are anybody known a right solution?