pub struct Builder {
pub address: &'static str,
pub target: &'static str,
pub log_level: LogLevel,
pub threads: usize,
}
Expand description
Structure for proxy server configuration
Fields§
§address: &'static str
§target: &'static str
§log_level: LogLevel
§threads: 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, cb: Option<ChangeTarget>) -> Result<Infallible>
pub fn bind(self, cb: Option<ChangeTarget>) -> Result<Infallible>
Proxy server listener releasing std::net::TcpListener
via thread pool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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