pub trait Engine: Send + Sync {
Show 17 methods
// Required methods
fn collection(&self) -> Arc<Collection> ⓘ;
fn add_secret_source(
&self,
scheme: &str,
source: Arc<dyn SecretSource>,
) -> Result<(), SecretError>;
fn genesis(
&self,
entry: &Identifier,
params: HashMap<String, Value>,
) -> LogicResult<()>;
fn errors(&self) -> LogicErrors;
fn set_auto_end(&self, auto_end: bool);
fn auto_end(&self) -> bool;
fn log_level(&self) -> LogLevel;
fn add_logs_listener(&self, sender: Sender<Log>);
fn debug_level(&self) -> DebugLevel;
fn add_debug_listener(&self, sender: Sender<Event>);
fn live<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn instanciate<'life0, 'async_trait>(
&'life0 self,
callback: Option<DirectCreationCallback>,
) -> Pin<Box<dyn Future<Output = LogicResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn end<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn check_secrets<'life0, 'async_trait>(
&'life0 self,
secrets: Vec<(String, Secret)>,
) -> Pin<Box<dyn Future<Output = LogicResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn log<'life0, 'async_trait>(
&'life0 self,
level: LogLevel,
label: String,
message: String,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn secrets_access(
&self,
element: Identifier,
label: Option<String>,
track_id: Option<TrackId>,
) -> SecretsAccess;
}Required Methods§
fn collection(&self) -> Arc<Collection> ⓘ
Sourcefn add_secret_source(
&self,
scheme: &str,
source: Arc<dyn SecretSource>,
) -> Result<(), SecretError>
fn add_secret_source( &self, scheme: &str, source: Arc<dyn SecretSource>, ) -> Result<(), SecretError>
Gives a secret source for the scheme of locators, such as api for api:<name>.
Only possible before genesis, that registers it before the sources of models: as for
env and file, a model registering the same scheme makes the launch fail.
fn genesis( &self, entry: &Identifier, params: HashMap<String, Value>, ) -> LogicResult<()>
fn errors(&self) -> LogicErrors
fn set_auto_end(&self, auto_end: bool)
fn auto_end(&self) -> bool
fn log_level(&self) -> LogLevel
fn add_logs_listener(&self, sender: Sender<Log>)
fn debug_level(&self) -> DebugLevel
fn add_debug_listener(&self, sender: Sender<Event>)
fn live<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn instanciate<'life0, 'async_trait>(
&'life0 self,
callback: Option<DirectCreationCallback>,
) -> Pin<Box<dyn Future<Output = LogicResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn end<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stops every running track and continuous task, after ending as end does: their
futures are dropped at their next await point, and live then ends.
Sourcefn check_secrets<'life0, 'async_trait>(
&'life0 self,
secrets: Vec<(String, Secret)>,
) -> Pin<Box<dyn Future<Output = LogicResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn check_secrets<'life0, 'async_trait>(
&'life0 self,
secrets: Vec<(String, Secret)>,
) -> Pin<Box<dyn Future<Output = LogicResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Resolves the secrets given for each parameter and drops their values right away, to check that they can be resolved.
Sourcefn log<'life0, 'async_trait>(
&'life0 self,
level: LogLevel,
label: String,
message: String,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn log<'life0, 'async_trait>(
&'life0 self,
level: LogLevel,
label: String,
message: String,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Logs a message from the engine itself.
Sourcefn secrets_access(
&self,
element: Identifier,
label: Option<String>,
track_id: Option<TrackId>,
) -> SecretsAccess
fn secrets_access( &self, element: Identifier, label: Option<String>, track_id: Option<TrackId>, ) -> SecretsAccess
Gives an access to secrets on behalf of element, for code driving the engine
from outside, such as distribution.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".