Skip to content

[FEATURE REQUEST] Make SignalBuilder::accumulator closure easier to use. #1580

@pjungkamp

Description

@pjungkamp

The current function definition for the SignalHandler::accumulator is Fn(&SignalInvocationHint, &mut Value, &Value) -> bool. The returned bool decides on the control flow of the signal emission. Could we migrate to a Fn(&SignalInvocationHint, &Value, &Value) -> std::ops::ControlFlow<Value, Value>?

This would allow for nicer bindings in e.g. #214 and I'd like it to be in the same release as #1575 since class_handler and accumulator are tightly related.

@sdroege What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions