-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Overview:
- The README.md example snippets shows how to create a
Docs<Store>struct in rust
let docs: Docs<Store> = Docs::memory().spawn(&blobs, &gossip).await?;- However, when I create a client, and a document, the rust types for these structs are complex, part of it is even private i.e.
quic-rpc/Connection
let docs_client = docs.client();
let doc = docs_client.create().await?;I'm running into the following issue:
- It is not clear, what is the intended lifecycle of these structs.
- Should I save the instance and passing them around my applications's struct/function to implement my logic? (Complicated typing leads to compiler headaches)
- Or treat them as one-off instance, and instead clone the
Docs<Store>struct &NamespaceID, then uses it to spawn in the document client when ever needed. (Seems to not be ideal, performance wise)
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status