Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Operation trait #61

Open
pesterev opened this issue Nov 29, 2022 · 0 comments
Open

Introduce Operation trait #61

pesterev opened this issue Nov 29, 2022 · 0 comments
Assignees

Comments

@pesterev
Copy link

pesterev commented Nov 29, 2022

Currently, all operations map to a prepared piece of code using the match construction. It's not ergonomic enough and not able to use queries.

My suggestion is to introduce the Operation trait inspired by this discussion:

trait Operation {
    fn execute(&mut self, status: Arc<Status>, client: Client, index: usize, test_env: TestEnv);
}

And to implement it for all operations. The execute will accept a client instance and use it to make queries and submissions. Anyway, the design of the trait is discussable.

UPDATE: Let's keep Operation impls separately in different modules/files.

@pesterev pesterev self-assigned this Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant