Crates.io | emwin-tg |
lib.rs | emwin-tg |
version | 0.1.0 |
source | src |
created_at | 2022-02-05 05:02:30.843129 |
updated_at | 2022-02-05 05:02:30.843129 |
description | A client for the the NWS Emergency Managers Weather Information Network telecommunications gateway |
homepage | |
repository | https://github.com/willglynn/emwin-tg |
max_upload_size | |
id | 527273 |
size | 54,619 |
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.
#![forbid(unsafe_code)]
let mut stream = emwin_tg::TextStream::new();
while let Some(event) = stream.next().await {
match event {
Ok(product) => {
// Handle the product
println!("{}: {}", product.filename, product.into_string_lossy());
},
Err(error) => {
// Stream continues, automatically retrying as needed
eprintln!("uh oh: {}", error);
},
}
}