backbone_activity/application/service/mod.rs
1//! Application services
2//!
3//! Generated by metaphor-schema. Do not edit manually.
4//!
5//! Each entity service is a type alias over `GenericCrudService`.
6
7pub mod error;
8pub use error::{ServiceError, ServiceResult};
9
10pub mod activity_service;
11
12
13pub use activity_service::ActivityService;
14pub use activity_service::ActivityRowRules;
15
16/// A `ActivityService` over `repository` with its write guard attached: the way to build it, so its writes are
17/// served only with the rules the schema declares.
18pub fn build_activity_service(
19 repository: std::sync::Arc<crate::infrastructure::persistence::ActivityRepository>,
20) -> ActivityService {
21 ActivityService::with_repository(repository).with_guard(std::sync::Arc::new(ActivityRowRules))
22}