Skip to main content

nntp_rs/
lib.rs

1#![doc = include_str!("../README.md")]
2#![expect(rustdoc::bare_urls)]
3// Deny unwrap/expect in production code (tests are exempt via clippy.toml)
4#![deny(clippy::unwrap_used)]
5#![deny(clippy::expect_used)]
6
7/// RFC 5536 Article Format
8pub mod article;
9/// Article assembler for binary downloads
10pub mod assembler;
11/// Header caching for NNTP client
12pub mod cache;
13mod capabilities;
14mod client;
15/// NNTP command builders and response parsers
16pub mod commands;
17mod config;
18/// RFC 2047 Encoded Words support for international headers
19pub mod encoded_words;
20mod error;
21/// NZB file format parser
22pub mod nzb;
23/// PAR2 file format parser for error correction
24pub mod par2;
25mod pool;
26/// Rate limiting for bandwidth and connection management
27pub mod ratelimit;
28mod response;
29/// SASL authentication framework (RFC 4643)
30pub mod sasl;
31/// Segment fetcher for Usenet binary downloads
32pub mod segments;
33/// Multi-server support with automatic failover
34pub mod servers;
35/// RFC 5536 Article validation utilities
36pub mod validation;
37/// yEnc binary encoding/decoding for Usenet
38pub mod yenc;
39
40pub use article::{Article, ArticleBuilder, ControlMessage, Headers, parse_article, parse_headers};
41pub use assembler::{ArticleAssembler, PartInfo, PartStatus};
42pub use cache::{HeaderCache, LruHeaderCache};
43pub use capabilities::Capabilities;
44pub use client::NntpClient;
45pub use commands::{ArticleInfo, DistributionInfo, GroupInfo, HdrEntry, ModeratorInfo, XoverEntry};
46pub use config::ServerConfig;
47pub use error::{NntpError, Result};
48pub use nzb::{Nzb, NzbFile, NzbSegment, parse_nzb};
49pub use par2::{
50    CreatorPacket, FileDescriptionPacket, FileStatus, FileVerification, IfscPacket, MainPacket,
51    PacketHeader, PacketType, Par2File, Par2Set, RecoverySlicePacket,
52};
53pub use pool::{NntpPool, RetryConfig};
54pub use ratelimit::{BandwidthLimiter, ConnectionLimiter, ConnectionPermit};
55pub use response::{NntpBinaryResponse, NntpResponse, codes};
56pub use sasl::{SaslMechanism, SaslPlain, decode_sasl_data, encode_sasl_data};
57pub use segments::{FetchConfig, FetchProgress, SegmentFetchResult, SegmentFetcher, SegmentStatus};
58pub use servers::{FailoverStrategy, GroupStats, ServerGroup, ServerStats};
59pub use validation::{
60    ValidationConfig, parse_date, validate_date, validate_message_id, validate_newsgroup_name,
61};
62pub use yenc::{
63    YencDecoded, YencEnd, YencHeader, YencMultipartAssembler, YencPart, decode as yenc_decode,
64    encode as yenc_encode,
65};