Struct proxy_server::Builder
source · pub struct Builder {
pub address: &'static str,
pub target: &'static str,
pub log_level: LogLevel,
pub threads: usize,
pub chunk_size: usize,
}
Expand description
Structure for proxy server configuration
Fields§
§address: &'static str
§target: &'static str
§log_level: LogLevel
§threads: usize
§chunk_size: usize
Implementations§
source§impl Builder
impl Builder
sourcepub fn with_address(self, address: &'static str) -> Self
pub fn with_address(self, address: &'static str) -> Self
Set proxy server address
sourcepub fn with_target(self, target: &'static str) -> Self
pub fn with_target(self, target: &'static str) -> Self
Set proxy server target address
sourcepub fn with_log_level(self, log_level: LogLevel) -> Self
pub fn with_log_level(self, log_level: LogLevel) -> Self
Set log level of proxy server
sourcepub fn with_threads(self, threads: usize) -> Self
pub fn with_threads(self, threads: usize) -> Self
Set proxy server count of used threads
sourcepub fn bind(self) -> Result<()>
pub fn bind(self) -> Result<()>
Proxy server listener releasing std::net::TcpListener
via thread pool