pub fn ShowMessage(
Severity: MessageSeverity,
Message: String,
OptionsValue: Value,
) -> ActionEffect<Arc<dyn UserInterfaceProvider>, CommonError, Option<String>>Expand description
Creates an effect that, when executed, will display a message to the user with a given severity and a set of optional action buttons.
It uses the UserInterfaceProvider capability from the environment to
perform the operation, which typically involves sending an event to the
frontend and waiting for the user’s interaction.
§Parameters
Severity: TheMessageSeverityof the message (Info, Warning, Error).Message: The primary text content of the message.OptionsValue: Aserde_json::Valuerepresenting theMessageOptionsDTO, which can include a title, detail text, and a list of action buttons.
§Returns
An ActionEffect that resolves with an Option<String>, containing the
string title of the action button the user clicked, or None if the
message was dismissed without an action.