handle_ui_action

Function handle_ui_action 

Source
pub async fn handle_ui_action(
    action: UIAction,
    node: &Arc<Node>,
    ui_sender: UnboundedSender<UIEvent>,
) -> Result<()>
Expand description

Handles incoming UIActions and dispatches them to appropriate handlers.

This function is the central point for processing user-initiated actions, translating them into background tasks or direct application responses.

§Arguments

  • action - The UIAction to be handled.
  • node - A shared reference to the application’s core Node.
  • ui_sender - The sender for emitting UIEvents back to the UI.

§Errors

Returns an error if an unrecoverable issue occurs during action processing.