pub trait LocalService: Sync {
// Required methods
fn prefix(&self) -> &[u8] ⓘ;
fn serve(&self, client: &TcpStream);
}Expand description
A service that shares the proxy’s port.
Required Methods§
Sourcefn prefix(&self) -> &[u8] ⓘ
fn prefix(&self) -> &[u8] ⓘ
The bytes a connection for this service starts with. Not empty, and not the start of any HTTP method.
Sourcefn serve(&self, client: &TcpStream)
fn serve(&self, client: &TcpStream)
Serve one connection. Its first bytes are Self::prefix, still
unread. The service records what it decides itself.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".