zynagent-first application framework

Back to the API reference

zyn.Flash#

/// Request-scoped transient messages supplied by actions.
pub const Flash = struct {
    pub const Entry = flash_store.Entry;
    pub const Kind = flash_store.Kind;
    pub const Message = flash_store.Message;

    /// Adds an application-shaped message to the current response flow.
    pub fn add(self: Flash, kind: Kind, message: Message) !void;

    /// Returns messages available to the current response flow.
    pub fn messages(self: Flash) []const Entry;
};