feat(config): make config store trait Send
This commit is contained in:
parent
03d2aac56e
commit
83a58c9912
|
@ -27,7 +27,7 @@ mod resolve;
|
||||||
mod util;
|
mod util;
|
||||||
pub(crate) mod store;
|
pub(crate) mod store;
|
||||||
|
|
||||||
pub trait Config {
|
pub trait Config: Send {
|
||||||
fn id(&self) -> i32;
|
fn id(&self) -> i32;
|
||||||
fn label(&self) -> &str;
|
fn label(&self) -> &str;
|
||||||
fn match_paths(&self) -> &[String];
|
fn match_paths(&self) -> &[String];
|
||||||
|
@ -36,7 +36,7 @@ pub trait Config {
|
||||||
fn is_match(&self, app: &AppProperties) -> bool;
|
fn is_match(&self, app: &AppProperties) -> bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait ConfigStore {
|
pub trait ConfigStore: Send {
|
||||||
fn default(&self) -> &dyn Config;
|
fn default(&self) -> &dyn Config;
|
||||||
fn active<'a>(&'a self, app: &AppProperties) -> &'a dyn Config;
|
fn active<'a>(&'a self, app: &AppProperties) -> &'a dyn Config;
|
||||||
fn configs(&self) -> Vec<&dyn Config>;
|
fn configs(&self) -> Vec<&dyn Config>;
|
||||||
|
|
|
@ -21,7 +21,7 @@ use super::{Match, Variable};
|
||||||
|
|
||||||
mod default;
|
mod default;
|
||||||
|
|
||||||
pub trait MatchStore {
|
pub trait MatchStore: Send {
|
||||||
fn query(&self, paths: &[String]) -> MatchSet;
|
fn query(&self, paths: &[String]) -> MatchSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user