rsef-rs

Crates.iorsef-rs
lib.rsrsef-rs
version0.2.0
sourcesrc
created_at2019-02-04 13:38:53.486575
updated_at2020-05-27 11:06:11.539807
descriptionA library for downloading and parsing RIR Statistics Exchange Format (RSEF) listings.
homepagehttps://github.com/DevQps/rsef-rs
repositoryhttps://github.com/DevQps/rsef-rs
max_upload_size
id112646
size49,651
Christian Veenman (DevQps)

documentation

https://docs.rs/rsef-rs

README

RIR Statistics Exchange Format in Rust (rsef-rs)

Build Status codecov Crates

A library for downloading and parsing RIR Statistics Exchange Format (RSEF) listings in Rust.

Features

rsef-rs optionally includes the download feature which allows you to download listings from Regional Internet Registries with a single statement. In order to enable the download feature you can add the following to your dependencies section in your Cargo.toml:

[dependencies]
rsef-rs = { version = "0.2", features = ["download"] }

Examples & Documentation

Downloading and parsing an RSEF Listing

If you enabled the download feature, you can download listings as shown below:

use rsef_rs::{Registry, Line};

// Friday 1 February 2019 21:22:48
let timestamp = 1_549_056_168;
let stream = Registry::RIPE.download(timestamp).unwrap();
let records = rsef_rs::read_all(stream).unwrap();

for x in records {
    match x {
        Line::Version(x) => println!("Version: {:?}", x),
        Line::Summary(x) => println!("Summary: {:?}", x),
        Line::Record(x) => println!("Record: {:?}", x),
    }
}

For examples and documentation look here.

Commit count: 11

cargo fmt