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

api: use generic types parameters #4

Open
broucz opened this issue Nov 26, 2019 · 0 comments · May be fixed by #5
Open

api: use generic types parameters #4

broucz opened this issue Nov 26, 2019 · 0 comments · May be fixed by #5
Labels
enhancement New feature or request
Milestone

Comments

@broucz
Copy link
Owner

broucz commented Nov 26, 2019

Use generic types parameters for Request and Response types in replacement of the Method, Params and Result types.

Example:

// From

pub enum Request {
    Batch(Vec<Payload>),
    Single(Payload),
}
// To

pub enum Request<Message, Params> {
    Batch(Vec<Payload<Message, Params>>),
    Single(Payload<Message, Params>),
}
@broucz broucz added the enhancement New feature or request label Nov 26, 2019
@broucz broucz added this to the v0.2 milestone Nov 26, 2019
This was referenced Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant