-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added collection struct for contexts to reduce number of arguments (c…
…lippy complained)
- Loading branch information
1 parent
b8d59d9
commit e509573
Showing
6 changed files
with
92 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use crate::api::hashing_context::HashingContextTrait; | ||
use crate::api::server::server::ecdar_backend_server::EcdarBackend; | ||
use crate::database::access_context::AccessContextTrait; | ||
use crate::database::in_use_context::InUseContextTrait; | ||
use crate::database::model_context::ModelContextTrait; | ||
use crate::database::query_context::QueryContextTrait; | ||
use crate::database::session_context::SessionContextTrait; | ||
use crate::database::user_context::UserContextTrait; | ||
use std::sync::Arc; | ||
|
||
#[derive(Clone)] | ||
pub struct ContextCollection { | ||
pub(crate) access_context: Arc<dyn AccessContextTrait>, | ||
pub(crate) in_use_context: Arc<dyn InUseContextTrait>, | ||
Check warning on line 14 in src/api/context_collection.rs GitHub Actions / Clippy lint and checkfields `in_use_context` and `model_context` are never read
Check warning on line 14 in src/api/context_collection.rs GitHub Actions / Clippy lint and checkfields `in_use_context` and `model_context` are never read
|
||
pub(crate) model_context: Arc<dyn ModelContextTrait>, | ||
pub(crate) query_context: Arc<dyn QueryContextTrait>, | ||
pub(crate) session_context: Arc<dyn SessionContextTrait>, | ||
pub(crate) user_context: Arc<dyn UserContextTrait>, | ||
pub(crate) reveaal_context: Arc<dyn EcdarBackend>, | ||
pub(crate) hashing_context: Arc<dyn HashingContextTrait>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod auth; | ||
pub mod context_collection; | ||
pub mod ecdar_api; | ||
pub mod hashing_context; | ||
pub mod reveaal_context; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.