Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

NNTP client for Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

mattnenterprise/rust-nntp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NNTP Client for Rust

Build Statuscrates.io

Usage

externcrate nntp;use nntp::{Article,NNTPStream};fnmain(){letmut nntp_stream =matchNNTPStream::connect(("nntp.aioe.org",119)){Ok(stream) => stream,Err(e) =>panic!("{}", e)};match nntp_stream.capabilities(){Ok(lines) =>{for linein lines.iter(){print!("{}", line);}},Err(e) =>panic!(e)}match nntp_stream.list(){Ok(groups) =>{for groupin 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 linein body.iter(){print!("{}", line)}},Err(e) =>panic!(e)}match nntp_stream.article_by_id("<cakj55F1dofU5@mid.individual.net>"){Ok(Article{headers, body}) =>{for(key, value)in headers.iter(){println!("{}: {}", key, value)}for linein body.iter(){print!("{}", line)}},Err(e) =>panic!(e)}let _ = nntp_stream.quit();}

License

MIT

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionallysubmitted for inclusion in the work by you, as defined in the Apache-2.0license, shall be dual licensed as above, without any additional terms orconditions.

About

NNTP client for Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp