pub struct Server<T> { /* private fields */ }Expand description
Represents a server that can be used to receive requests & send responses to clients.
Implementations§
Source§impl<T> Server<T>
impl<T> Server<T>
Sourcepub fn into_tcp_builder(self) -> TcpServerBuilder<T>
pub fn into_tcp_builder(self) -> TcpServerBuilder<T>
Consume Server and produce a builder for a TCP variant.
Source§impl<T> Server<T>
impl<T> Server<T>
Sourcepub fn into_windows_pipe_builder(self) -> WindowsPipeServerBuilder<T>
pub fn into_windows_pipe_builder(self) -> WindowsPipeServerBuilder<T>
Consume Server and produce a builder for a Windows pipe variant.
Source§impl Server<()>
impl Server<()>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new Server, starting with a default configuration, no authentication methods,
and no ServerHandler.
Sourcepub fn tcp() -> TcpServerBuilder<()>
pub fn tcp() -> TcpServerBuilder<()>
Creates a new TcpServerBuilder that is used to construct a Server.
Sourcepub fn windows_pipe() -> WindowsPipeServerBuilder<()>
pub fn windows_pipe() -> WindowsPipeServerBuilder<()>
Creates a new WindowsPipeServerBuilder that is used to construct a Server.
Source§impl<T> Server<T>
impl<T> Server<T>
Sourcepub fn config(self, config: ServerConfig) -> Self
pub fn config(self, config: ServerConfig) -> Self
Consumes the current server, replacing its config with config and returning it.
Sourcepub fn handler<U>(self, handler: U) -> Server<U>
pub fn handler<U>(self, handler: U) -> Server<U>
Consumes the current server, replacing its handler with handler and returning it.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Server<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Server<T>
impl<T> Send for Server<T>where
T: Send,
impl<T> Sync for Server<T>where
T: Sync,
impl<T> Unpin for Server<T>where
T: Unpin,
impl<T> !UnwindSafe for Server<T>
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