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

[suggestion] Make Action and Filter non-generic #4259

Closed
DCNick3 opened this issue Feb 6, 2024 · 0 comments
Closed

[suggestion] Make Action and Filter non-generic #4259

DCNick3 opened this issue Feb 6, 2024 · 0 comments
Assignees
Labels
api-changes Changes in the API for client libraries iroha2-dev The re-implementation of a BFT hyperledger in RUST Refactor Improvement to overall code quality

Comments

@DCNick3
Copy link
Contributor

DCNick3 commented Feb 6, 2024

Action and Filter are currently generic over a type of filter they use. This is used in iroha_core to split event triggers for events coming from different sources.

This is iroha_core an implementation detail that makes iroha_data_model harder to understand for the user.

Action should have a concrete event filter type specified and iroha_core should have its own types for the specialized event filters which would not be exposed to the user.

@DCNick3 DCNick3 added iroha2-dev The re-implementation of a BFT hyperledger in RUST api-changes Changes in the API for client libraries Refactor Improvement to overall code quality labels Feb 6, 2024
@DCNick3 DCNick3 changed the title Make Action and Filter non-generic [suggestion] Make Action and Filter non-generic Feb 6, 2024
@DCNick3 DCNick3 self-assigned this Mar 18, 2024
DCNick3 added a commit to DCNick3/iroha that referenced this issue Mar 19, 2024
… types

They were previously generic over the event filter type, but this was used only in iroha_core. Instead generic copies of these types are put into core, ultimetely simplifying the public API.

Signed-off-by: Nikita Strygin <[email protected]>
DCNick3 added a commit to DCNick3/iroha that referenced this issue Mar 19, 2024
…`Action`s

Make Action's constructor accept `impl Into<TriggeringEventFilterBox>`. Add shorthand conversions from concrete data event filter types into the top-level boxes

Signed-off-by: Nikita Strygin <[email protected]>
DCNick3 added a commit to DCNick3/iroha that referenced this issue Mar 19, 2024
… types

They were previously generic over the event filter type, but this was used only in iroha_core. Instead generic copies of these types are put into core, ultimetely simplifying the public API.

Signed-off-by: Nikita Strygin <[email protected]>
DCNick3 added a commit to DCNick3/iroha that referenced this issue Mar 19, 2024
…`Action`s

Make Action's constructor accept `impl Into<TriggeringEventFilterBox>`. Add shorthand conversions from concrete data event filter types into the top-level boxes

Signed-off-by: Nikita Strygin <[email protected]>
DCNick3 added a commit to DCNick3/iroha that referenced this issue Mar 19, 2024
… types

They were previously generic over the event filter type, but this was used only in iroha_core. Instead generic copies of these types are put into core, ultimetely simplifying the public API.

Signed-off-by: Nikita Strygin <[email protected]>
DCNick3 added a commit to DCNick3/iroha that referenced this issue Mar 19, 2024
…`Action`s

Make Action's constructor accept `impl Into<TriggeringEventFilterBox>`. Add shorthand conversions from concrete data event filter types into the top-level boxes

Signed-off-by: Nikita Strygin <[email protected]>
DCNick3 added a commit to DCNick3/iroha that referenced this issue Mar 19, 2024
… types

They were previously generic over the event filter type, but this was used only in iroha_core. Instead generic copies of these types are put into core, ultimetely simplifying the public API.

Signed-off-by: Nikita Strygin <[email protected]>
DCNick3 added a commit to DCNick3/iroha that referenced this issue Mar 19, 2024
…`Action`s

Make Action's constructor accept `impl Into<TriggeringEventFilterBox>`. Add shorthand conversions from concrete data event filter types into the top-level boxes

Signed-off-by: Nikita Strygin <[email protected]>
mversic pushed a commit that referenced this issue Mar 19, 2024
* [refactor] #4259: Make Action and Filter non-generic types

They were previously generic over the event filter type, but this was used only in iroha_core. Instead generic copies of these types are put into core, ultimetely simplifying the public API.

Signed-off-by: Nikita Strygin <[email protected]>

* [refactor] #4259: Use conversions when constructing `Action`s

Make Action's constructor accept `impl Into<TriggeringEventFilterBox>`. Add shorthand conversions from concrete data event filter types into the top-level boxes

Signed-off-by: Nikita Strygin <[email protected]>
@DCNick3 DCNick3 closed this as completed Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-changes Changes in the API for client libraries iroha2-dev The re-implementation of a BFT hyperledger in RUST Refactor Improvement to overall code quality
Projects
None yet
Development

No branches or pull requests

1 participant