pub struct Server { /* private fields */ }Expand description
A bound server, ready for running accept-loop using a tower service.
Implementations§
Source§impl Server
impl Server
Sourcepub async fn bind(config: ServerConfig) -> Result<Self>
pub async fn bind(config: ServerConfig) -> Result<Self>
Bind server to address and port given by config
Sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
Access the locally bound address
Auto Trait Implementations§
impl !Freeze for Server
impl !RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl !UnwindSafe for Server
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