Product Promotion
0x5a.live
for different kinds of informations and explorations.
GitHub - mattnenterprise/rust-nntp: NNTP client for Rust
NNTP client for Rust. Contribute to mattnenterprise/rust-nntp development by creating an account on GitHub.
Visit SiteGitHub - mattnenterprise/rust-nntp: NNTP client for Rust
NNTP client for Rust. Contribute to mattnenterprise/rust-nntp development by creating an account on GitHub.
Powered by 0x5a.live 💗
rust-nntp
NNTP Client for Rust
Usage
extern crate nntp;
use nntp::{Article, NNTPStream};
fn main() {
let mut nntp_stream = match NNTPStream::connect(("nntp.aioe.org", 119)) {
Ok(stream) => stream,
Err(e) => panic!("{}", e)
};
match nntp_stream.capabilities() {
Ok(lines) => {
for line in lines.iter() {
print!("{}", line);
}
},
Err(e) => panic!(e)
}
match nntp_stream.list() {
Ok(groups) => {
for group in groups.iter() {
println!("Name: {}, High: {}, Low: {}, Status: {}", group.name, group.high, group.low, group.status)
}
},
Err(e) => panic!(e)
};
match nntp_stream.group("comp.sys.raspberry-pi") {
Ok(_) => (),
Err(e) => panic!(e)
}
match nntp_stream.article_by_number(6187) {
Ok(Article{headers, body}) => {
for (key, value) in headers.iter() {
println!("{}: {}", key, value)
}
for line in body.iter() {
print!("{}", line)
}
},
Err(e) => panic!(e)
}
match nntp_stream.article_by_id("<[email protected]>") {
Ok(Article{headers, body}) => {
for (key, value) in headers.iter() {
println!("{}: {}", key, value)
}
for line in body.iter() {
print!("{}", line)
}
},
Err(e) => panic!(e)
}
let _ = nntp_stream.quit();
}
License
MIT
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Rust Resources
are all listed below.
GitHub - rodrigorc/papercraft: Papercraft is a tool to unwrap 3D models.
resource
~/github.com
resource
GitHub - zellij-org/zellij: A terminal workspace with batteries included
resource
~/github.com
resource
GitHub - Rustixir/darkbird: In-memory database inspired by erlang mnesia
resource
~/github.com
resource
GitHub - serayuzgur/weld: Full fake REST API generator written with Rust
resource
~/github.com
resource
GitHub - LemmyNet/lemmy: 🐀 A link aggregator and forum for the fediverse
resource
~/github.com
resource
GitHub - osrg/rustybgp: BGP implemented in the Rust Programming Language
resource
~/github.com
resource
GitHub - shssoichiro/oxipng: Multithreaded PNG optimizer written in Rust
resource
~/github.com
resource
GitHub - Linus-Mussmaecher/rucola: Terminal-based markdown note manager.
resource
~/github.com
resource
GitHub - BurntSushi/rust-csv: A CSV parser for Rust, with Serde support.
resource
~/github.com
resource
Made with ❤️
to provide different kinds of informations and resources.