axum-impl-sse

Official

Stream reliable SSE updates from Axum

AuthorImpertio-Studio
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Axum SSE handlers often fail to compile or misbehave in production because the stream item types, keep-alive behavior, and Event builder rules are easy to get subtly wrong.

Core Features & Use Cases

  • Correct SSE handler types: Ensures you return Sse with a stream that yields Result<Event, E> (including the required .map(Ok) for infallible streams).
  • Production-stable long-lived streaming: Prevents dropped connections and “quiet stream goes dead” issues by applying KeepAlive.
  • Safe, panic-free Event construction: Avoids runtime panics caused by calling single-use Event builder methods more than once, or placing newlines/CR/LF where they are forbidden.
  • SSE vs WebSockets decisioning: Guides you to choose SSE for receive-only browser clients using EventSource.

Quick Start

Implement an Axum route that returns Sse<impl Stream<Item = Result<Event, Infallible>>>, builds each message with Event::default().data(...), lifts the stream with .map(Ok), and attaches .keep_alive(KeepAlive::default()) for long-lived updates.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: axum-impl-sse
Download link: https://github.com/Impertio-Studio/Axum-Claude-Skill-Package/archive/main.zip#axum-impl-sse

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.