Skip to main content

Engine

Trait Engine 

Source
pub trait Engine: Send + Sync {
Show 16 methods // Required methods fn collection(&self) -> Arc<Collection> ⓘ; 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§

Source

fn collection(&self) -> Arc<Collection> ⓘ

Source

fn genesis( &self, entry: &Identifier, params: HashMap<String, Value>, ) -> LogicResult<()>

Source

fn errors(&self) -> LogicErrors

Source

fn set_auto_end(&self, auto_end: bool)

Source

fn auto_end(&self) -> bool

Source

fn log_level(&self) -> LogLevel

Source

fn add_logs_listener(&self, sender: Sender<Log>)

Source

fn debug_level(&self) -> DebugLevel

Source

fn add_debug_listener(&self, sender: Sender<Event>)

Source

fn live<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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,

Source

fn end<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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.

Source

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.

Source

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.

Source

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".

Implementors§