Crate emwin_tg

Source
Expand description

§emwin

A Rust client for the NWS Emergency Managers Weather Information Network telecommunications gateway.

EMWIN is one of several platforms through which the National Weather Service distributes text products. EMWIN is transmitted via radio to GOES satellites for re-broadcast, and published as files on the NWS telecommunications gateway service.

The NWS telecommunications gateway permits anonymous access from the general public over the Internet. Usage of this crate therefore requires no setup.

§Example

use futures::StreamExt;

let mut stream = emwin_tg::TextStream::new();

while let Some(event) = stream.next().await {
    match event {
        Ok(product) => {
            // Handle the product
            assert_eq!(product.mime_type(), Some("text/plain"));
            println!("{}: {}", product.filename, product.into_string_lossy());
        }
        Err(error) => {
            // Stream continues, automatically retrying as needed
            eprintln!("uh oh: {}", error);
        }
    }
}

Structs§

ImageSource
The feed of image products from EMWIN TG.
Product
A data product from an EMWIN archive.
Stream
A stream of products from the EMWIN TG text feed.
TextSource
The feed of text products from EMWIN TG.

Enums§

Error
An error which occurred while retrieving from an EMWIN TG stream.

Traits§

Source
A source of EMWIN TG data.

Type Aliases§

ImageStream
A Stream of image products.
TextStream
A Stream of text products.