Skip to content

Use trait instead of Event#36

Open
era wants to merge 2 commits intojopohl:masterfrom
era:era/query
Open

Use trait instead of Event#36
era wants to merge 2 commits intojopohl:masterfrom
era:era/query

Conversation

@era
Copy link
Copy Markdown
Contributor

@era era commented Nov 22, 2025

This would be a breaking change. Today, the Event is a concrete type that internally uses a HashMap. This may be a problem for low-latency applications, where having to create an event from other data structures may be problematic (image applications that have different rules engines and may need to allocate to each different rule engine "event").

Ultimately, what we really want is the ability to query the data structure, so anything that conforms to such an API should work for the crate. This PR introduces a QueryableEvent trait, which is implemented by Event. The QueryableEvent can be implemented by the crate users for their different structs instead of forcing them to convert to a sigma_rust::Event.

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

Successfully merging this pull request may close these issues.

1 participant