Crate spinta

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§

native

Structs§

EsReceiver

Enums§

EsEvent
Something happening with the connection.

Functions§

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

Type Aliases§

Error
EventHandler
Result