pub struct SmbServer { /* private fields */ }Expand description
A built but not-yet-running SMB server.
Use serve() to bind the configured listener and run until shutdown.
Implementations§
Source§impl SmbServer
impl SmbServer
pub fn builder() -> SmbServerBuilder
pub fn config_handle(&self) -> ConfigHandle
Sourcepub async fn bind(&self) -> Result<SocketAddr>
pub async fn bind(&self) -> Result<SocketAddr>
Bind the listen address without starting the accept loop. Returns the bound address, which gives the real port when the configured port is 0.
Sourcepub async fn local_addr(&self) -> Option<SocketAddr>
pub async fn local_addr(&self) -> Option<SocketAddr>
Returns the actual bound address. None if bind()/serve() have
not yet been called.
Sourcepub fn configured_addr(&self) -> SocketAddr
pub fn configured_addr(&self) -> SocketAddr
Listen address as configured. Use local_addr() for the bound
address.
Sourcepub fn shutdown(&self)
pub fn shutdown(&self)
Initiate a graceful shutdown. Stops the accept loop and closes each
connection once its current request is answered. Takes effect even
when called before serve().
Sourcepub fn shutdown_handle(&self) -> ShutdownHandle
pub fn shutdown_handle(&self) -> ShutdownHandle
Returns a clonable handle that can request shutdown after serve()
has consumed the SmbServer value.
Auto Trait Implementations§
impl !Freeze for SmbServer
impl !RefUnwindSafe for SmbServer
impl !UnwindSafe for SmbServer
impl Forget for SmbServer
impl Move for SmbServer
impl Send for SmbServer
impl Sync for SmbServer
impl Unpin for SmbServer
impl UnsafeUnpin for SmbServer
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