-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Hi !
Thank you for this library, it looks great but I'm no Rust expert and I really struggle its lifetimes and creating a struct wrapper around it.
Is it actually possible to have a generic struct owning the env, wtxn and database ?
Like so:
pub struct Database<'p, Key, Value>
where
Key: Ord + Clone + Debug + ?Sized + 'static,
Value: PartialEq + 'static,
{
env: Env,
wtxn: RwTxn<'p>,
db: Database<Key, Value>
}The use case is that I have a lot of little databases with a ton of data spread among them and having to manage all env/wtxn is quite complicated and kind of messy (again I'm not a rust expert). It would really be much nicer in a nice wrapper which is possible with many other databases.
Metadata
Metadata
Assignees
Labels
No labels