Crate spinta

source ·
Expand description

A Server-sent events client library that can be compiled to both native and the web (WASM).

Usage:

let receiver = spinta::connect("http://example.com").unwrap();
while let Some(event) = receiver.try_recv() {
    println!("Received {:?}", event);
}

Re-exports

pub use native::*;

Modules

Structs

Enums

Something happening with the connection.

Functions

The easiest to use function.
Like connect, but will call the given wake-up function on each incoming event.

Type Definitions