use std::{error::Error, io::stderr}; use irrc::{IrrClient, Query}; fn main() -> Result<(), Box> { tracing_subscriber::fmt() .with_max_level(tracing::Level::WARN) .with_writer(stderr) .try_init()?; IrrClient::new("whois.radb.net:43") .connect()? .pipeline() .push(Query::MntBy("WORKONLINE-MNT".parse()?))? .responses::() .filter_map(|item_result| { item_result .map_err(|err| tracing::warn!("failed to parse item: {}", err)) .ok() }) .for_each(|item| { println!("## START ##\n{}\n## END ##", item.content()); }); Ok(()) }