pub struct LinksServer { /* private fields */ }Expand description
A bound, not yet serving, LiNo server.
Implementations§
Source§impl LinksServer
impl LinksServer
Sourcepub fn bind(
address: impl ToSocketAddrs,
options: ServerOptions,
) -> ProtocolResult<Self>
pub fn bind( address: impl ToSocketAddrs, options: ServerOptions, ) -> ProtocolResult<Self>
Binds to address (use port 0 for an ephemeral port).
Sourcepub fn local_addr(&self) -> ProtocolResult<SocketAddr>
pub fn local_addr(&self) -> ProtocolResult<SocketAddr>
The address the server listens on.
Sourcepub fn shutdown_handle(&self) -> ProtocolResult<ShutdownHandle>
pub fn shutdown_handle(&self) -> ProtocolResult<ShutdownHandle>
A handle that stops serve.
Sourcepub fn serve<S: NamedTypeLinks>(self, storage: &mut S) -> ProtocolResult<()>
pub fn serve<S: NamedTypeLinks>(self, storage: &mut S) -> ProtocolResult<()>
Serves storage until a ShutdownHandle stops the server.
Trait Implementations§
Auto Trait Implementations§
impl !Sync for LinksServer
impl Freeze for LinksServer
impl RefUnwindSafe for LinksServer
impl Send for LinksServer
impl Unpin for LinksServer
impl UnsafeUnpin for LinksServer
impl UnwindSafe for LinksServer
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