major refactoring
This commit is contained in:
parent
e8a8b5976b
commit
8aaf61efb1
10 changed files with 404 additions and 222 deletions
|
|
@ -111,18 +111,14 @@ impl ApiResponse {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait ApiSelection: Send + Sync {
|
||||
pub trait ApiSelection: Send + Sync + 'static {
|
||||
type Response: From<ApiResponse> + Send + Sync;
|
||||
|
||||
fn raw_value(self) -> &'static str;
|
||||
|
||||
fn category() -> &'static str;
|
||||
}
|
||||
|
||||
pub trait ApiCategoryResponse: Send + Sync {
|
||||
type Selection: ApiSelection;
|
||||
|
||||
fn from_response(response: ApiResponse) -> Self;
|
||||
}
|
||||
|
||||
pub struct DirectExecutor<C> {
|
||||
key: String,
|
||||
_marker: std::marker::PhantomData<C>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue