pub struct NntpProxy { /* private fields */ }Implementations§
Source§impl NntpProxy
impl NntpProxy
pub fn new(config: Config) -> Result<Self>
Sourcepub async fn prewarm_connections(&self) -> Result<()>
pub async fn prewarm_connections(&self) -> Result<()>
Pre-warm connections to all servers for optimal small file performance
Sourcepub fn next_server(&self) -> &ServerConfig
pub fn next_server(&self) -> &ServerConfig
Get the next server using round-robin
Sourcepub fn servers(&self) -> &[ServerConfig]
pub fn servers(&self) -> &[ServerConfig]
Get the list of servers
pub async fn handle_client( &self, client_stream: TcpStream, client_addr: SocketAddr, ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NntpProxy
impl !RefUnwindSafe for NntpProxy
impl Send for NntpProxy
impl Sync for NntpProxy
impl Unpin for NntpProxy
impl !UnwindSafe for NntpProxy
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