MCPcopy Create free account
hub / github.com/Migorithm/rustiful-backend / new

Method new

library/src/services/unit_of_work.rs:28–38  ·  view source on GitHub ↗
(context: AtomicContextManager)

Source from the content-addressed store, hash-verified

26
27{
28 pub async fn new(context: AtomicContextManager) -> ApplicationResult<Self> {
29 let executor = context.read().await.executor();
30 let mut uow = Self {
31 repository: R::new(executor.clone()),
32 context,
33 executor,
34
35 };
36 uow.begin().await?;
37 Ok(uow)
38 }
39 pub fn repository(&mut self) -> &mut R {
40 &mut self.repository
41 }

Callers

nothing calls this directly

Calls 2

executorMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected