Trait orchestrator::prelude::TestInterface
source · pub trait TestInterface: Send + Sync {
// Required methods
fn register<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn login<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn submit<'life0, 'async_trait>(
&'life0 mut self,
exercise: String,
code: String,
) -> Pin<Box<dyn Future<Output = Result<ExerciseResult, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_exercise<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Box<dyn Error + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
TestInterface, it describes how to connect to the orchestrator in order to execute exercises. Normally DefaultInterface is enough for most cases
Required Methods§
sourcefn register<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn register<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
register a new user, it takes username and password
sourcefn login<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn login<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
login the user with the provided username and password