pub struct ServerConfig {
pub host: String,
pub port: u16,
pub tls: bool,
pub username: Option<String>,
pub password: Option<String>,
pub connections: usize,
pub priority: i32,
pub pipeline_depth: usize,
}Expand description
NNTP server configuration
Fields§
§host: StringServer hostname
port: u16Server port (typically 119 for unencrypted, 563 for TLS)
tls: boolUse TLS (implicit TLS, not STARTTLS)
username: Option<String>Username for authentication
password: Option<String>Password for authentication
connections: usizeNumber of connections to maintain
priority: i32Server priority (lower = tried first, for backup servers)
pipeline_depth: usizeNumber of ARTICLE commands to pipeline per connection (default: 10)
Pipelining sends multiple ARTICLE commands before reading responses, reducing round-trip latency. Higher values can improve throughput but may increase memory usage. Set to 1 to disable pipelining (sequential mode).
Recommended values: 5-20 depending on network latency and server capabilities.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerConfig
impl Debug for ServerConfig
Source§impl<'de> Deserialize<'de> for ServerConfig
impl<'de> Deserialize<'de> for ServerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ServerConfig> for ServerConfig
impl From<ServerConfig> for ServerConfig
Source§fn from(config: ServerConfig) -> Self
fn from(config: ServerConfig) -> Self
Converts to this type from the input type.
Source§impl Serialize for ServerConfig
impl Serialize for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more